Skip to main content

Clock

Trait Clock 

Source
pub trait Clock:
    Send
    + Sync
    + 'static {
    // Required method
    fn now_ms(&self) -> u64;

    // Provided method
    fn now_s(&self) -> u64 { ... }
}
Expand description

Wall-clock time. The engines read it for quote expiries and event timestamps; EVM time always comes from the chain and Zcash time from block heights.

Required Methods§

Source

fn now_ms(&self) -> u64

Unix milliseconds.

Provided Methods§

Source

fn now_s(&self) -> u64

Unix seconds.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§