I'm having a bit of trouble with callbacks. i want to pass param1 as a parameter for mycallback. any idea?
note that planner.start() spawns a thread. so it's a bit trickier than it looks
let mut planner = periodic::Planner::new(); let param1 = 5; planner.add( mycallback, periodic::After::new(Duration::from_secs(5)), ); planner.start(); drop(planner)