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...

Trait Implementations

impl<'a> Drop for Timer<'a>
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more