Function repeat_timeout
pub fn repeat_timeout<F>(tm: f64, cb: F)where
F: FnMut() + 'static,
👎Deprecated since 1.2.26: please use
repeat_timeout3
insteadAvailable on crate feature
dep_fltk
only.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();
}