[−][src]Struct sdl2::gfx::framerate::FPSManager
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,