use std::{thread, time}; loop { let ten_millis = time::Duration::from_millis(10); let now = time::Instant::now(); thread::sleep(ten_millis); }