Skip to main content

current_time_ms

Function current_time_ms 

Source
pub fn current_time_ms() -> u64
Expand description

获取当前 Unix 时间戳(毫秒)

§时钟回拨防护(fail-closed)

当系统时钟回拨到 Unix Epoch 之前(SystemTime::now() < UNIX_EPOCH)时, 饱和返回 0,禁止 panic 或返回错误值。