1use std::time::{SystemTime, UNIX_EPOCH}; 2 3fn main() { 4 match SystemTime::now().duration_since(UNIX_EPOCH) { 5 Ok(n) => println!("1970-01-01 00:00:00 UTC was {} seconds ago!", n.as_secs()), 6 Err(_) => panic!("SystemTime before UNIX EPOCH!"), 7 } 8}