Function fltk::app::repeat_timeout2[][src]

pub fn repeat_timeout2(tm: f64, cb: fn())
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_timeout2(1.0, callback);
}
fn main() {
    let app = app::App::default();
    let mut wind = window::Window::new(100, 100, 400, 300, "");
    wind.show();
    app::add_timeout2(1.0, callback);
    app.run().unwrap();
}