pub fn timeout_ms<F>(f: F, max_ms: u32)where F: FnOnce() + Send + 'static,
Run f for at most max_ms, this function will panic if f is still running.