How can I create a timestamp and look for elapsed time after?
fn main() {
let stamp = DateTime::new();
thread::sleep(Duration::from_secs(5));
let elapsed = DateTime::elapsed(stamp);
println!("Elapsed time: {}", elapsed.secs().to_string()); // prints "Elapsed time: 5"
}
Please note, the code is not valid, I just ask for tools/libs which can help me to have the code like that.