[][src]Struct sdl2::gfx::framerate::FPSManager

pub struct FPSManager { /* fields omitted */ }

Structure holding the state and timing information of the framerate controller.

Methods

impl FPSManager[src]

pub fn new() -> FPSManager[src]

Create the framerate manager.

pub fn set_framerate(&mut self, rate: u32) -> Result<(), String>[src]

Set the framerate in Hz.

pub fn get_framerate(&self) -> i32[src]

Return the current target framerate in Hz.

pub fn get_frame_count(&self) -> i32[src]

Return the current framecount.

pub fn delay(&mut self) -> u32[src]

Delay execution to maintain a constant framerate and calculate fps.

Trait Implementations

impl Drop for FPSManager[src]

Auto Trait Implementations

impl RefUnwindSafe for FPSManager

impl !Send for FPSManager

impl !Sync for FPSManager

impl Unpin for FPSManager

impl UnwindSafe for FPSManager

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.