Struct sdl2::TimerSubsystem [−][src]
pub struct TimerSubsystem { /* fields omitted */ }Methods
impl TimerSubsystem[src]
impl TimerSubsystempub fn add_timer<'b, 'c>(
&'b self,
delay: u32,
callback: TimerCallback<'c>
) -> Timer<'b, 'c>[src]
pub fn add_timer<'b, 'c>(
&'b self,
delay: u32,
callback: TimerCallback<'c>
) -> Timer<'b, 'c>Constructs a new timer using the boxed closure callback.
The timer is started immediately, it will be cancelled either:
- when the timer is dropped
- or when the callback returns a non-positive continuation interval
pub fn ticks(&mut self) -> u32[src]
pub fn ticks(&mut self) -> u32Gets the number of milliseconds elapsed since the timer subsystem was initialized.
It's recommended that you use another library for timekeeping, such as time.
pub fn delay(&mut self, ms: u32)[src]
pub fn delay(&mut self, ms: u32)Sleeps the current thread for the specified amount of milliseconds.
It's recommended that you use std::thread::sleep() instead.
pub fn performance_counter(&self) -> u64[src]
pub fn performance_counter(&self) -> u64pub fn performance_frequency(&self) -> u64[src]
pub fn performance_frequency(&self) -> u64impl TimerSubsystem[src]
impl TimerSubsystemTrait Implementations
impl Sync for TimerSubsystem[src]
impl Sync for TimerSubsystemAuto Trait Implementations
impl !Send for TimerSubsystem
impl !Send for TimerSubsystem