Struct sdl2::timer::Timer
[−]
[src]
pub struct Timer<'a> { // some fields omitted }
Unstable because of move to unboxed closures and box
syntax
Methods
impl<'a> Timer<'a>
[src]
fn new(delay: u32, callback: TimerCallback<'a>) -> Timer<'a>
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
fn into_inner(self) -> TimerCallback<'a>
Returns the closure as a trait-object and cancels the timer by consuming it...