pub trait Sys {
    fn get_stack_height(&self) -> usize { ... }
    fn unix_timestamp(&self) -> u64 { ... }
}

Provided Methods

Get the current timestamp in seconds since Unix epoch

The function returns a [anchor_lang::prelude::Clock] value in the bpf arch, and first checks if there is a [Clock] in other archs, returning the system time if there is no clock (e.g. if not running in a simulator with its clock).

Implementations on Foreign Types

Implementors