Struct native_windows_gui::Timer
[−]
[src]
pub struct Timer { /* fields omitted */ }
A timer control
Methods
impl Timer
[src]
fn start(&mut self)
Start the timer. If the timer was already running, it is restarted.
fn stop(&mut self)
Stop the timer. If the timer was not started, this do nothing
fn running(&self) -> bool
Check if the timer is running. Return true
if it is or false
otherwise
fn elapsed(&self) -> Duration
Return the time elapsed since the timer started. If the timer was never started or was stopped, the returned value is 0.
fn set_interval(&mut self, interval: u32)
Set the interval of the timer. If the timer is running, it will be applied when the timer is restarted
fn get_interval(&self) -> u32
Return the interval of the timer
Trait Implementations
impl Control for Timer
[src]
fn handle(&self) -> AnyHandle
Should return the underlying handle to the object
fn control_type(&self) -> ControlType
Should return the type of the control. For custom controls, the return value should be Undefined
(the default).
fn free(&mut self)
If specified, should free any ressource allocated in the template build
function. This includes functions like DestroyWindow
.