Skip to main content

current_timestamp

Function current_timestamp 

Source
pub fn current_timestamp() -> u64
Expand description

Get current Unix timestamp (seconds since epoch)

Returns 0 if system time is before epoch (misconfigured VMs, containers). Prevents panics from SystemTime::now().duration_since(UNIX_EPOCH).unwrap().