Skip to main content

now_millis

Function now_millis 

Source
pub fn now_millis() -> u64
Expand description

The current time as milliseconds since the Unix epoch (UTC).

Returns 0 if the system clock is before the epoch. The WebSocket session uses it for its pong watchdog.

§Examples

use brokapi_bcs_protocol::utils::date_format::now_millis;

assert!(now_millis() > 1_700_000_000_000); // later than November 2023