Function add_timeout3
pub fn add_timeout3<F>(tm: f64, cb: F) -> *mut ()
Available on crate feature
dep_fltk
only.Expand description
Adds a one-shot timeout callback. The timeout duration tm
is indicated in seconds
This function returns a handle that can be use for future interaction with the timeout
Example:
use fltk::{prelude::*, *};
fn main() {
let callback = |_handle| {
println!("FIRED");
};
let app = app::App::default();
let mut wind = window::Window::new(100, 100, 400, 300, "");
wind.show();
let _handle = app::add_timeout3(1.0, callback);
app.run().unwrap();
}