12 lines
326 B
Rust
12 lines
326 B
Rust
use std::time::{Duration, SystemTime};
|
|
|
|
fn main() {
|
|
let formatted = humantime::format_duration(
|
|
SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap()
|
|
);
|
|
println!("{}", formatted);
|
|
|
|
let formatted = humantime::format_duration(Duration::from_millis(1000000));
|
|
println!("{}", formatted);
|
|
}
|