Function fltk::app::repeat_timeout [−][src]
pub fn repeat_timeout<F: FnMut() + 'static>(tm: f64, cb: F)
Expand description
Repeats a timeout callback from the expiration of the previous timeout.
You may only call this method inside a timeout callback.
The timeout duration tm
is indicated in seconds
Example:
use fltk::{prelude::*, *}; fn callback() { println!("TICK"); app::repeat_timeout(1.0, callback); } fn main() { let app = app::App::default(); let mut wind = window::Window::new(100, 100, 400, 300, ""); wind.show(); app::add_timeout(1.0, callback); app.run().unwrap(); }