pub fn new(strategy: FrameRateLimitStrategy, fps: u32) -> Self {
        let mut s = Self {
            frame_duration: Duration::from_secs(0),
            strategy: Default::default(),
            last_call: Instant::now(),
        };
        s.set_rate(strategy, fps);
        s
    }
/// Creates a new frame limiter.
Creates a new frame limiter.
Creates a new frame limiter .
pub fn new(strategy: FrameRateLimitStrategy, fps: u32) -> Self {
        let mut s = Self {
            frame_duration: Duration::from_secs(0),
            strategy: Default::default(),
            last_call: Instant::now(),
        };
        s.set_rate(strategy, fps);
        s
    }
pub fn new ( strategy : FrameRateLimitStrategy , fps : u32 ) -> Self { let mut s = Self { frame_duration : Duration :: from_secs ( 0 ) , strategy : Default :: default ( ) , last_call : Instant :: now ( ) , } ; s . set_rate ( strategy , fps ) ; s }
Creates a new frame limiter.
Creates a new frame limiter .
strategy
FrameRateLimitStrategy
fps
u32
strategy
FrameRateLimitStrategy
fps
u32