Trait jet_margin::syscall::Sys
source · [−]pub trait Sys {
fn get_stack_height(&self) -> usize { ... }
fn unix_timestamp(&self) -> u64 { ... }
}
Provided Methods
source
fn get_stack_height(&self) -> usize
sourcefn unix_timestamp(&self) -> u64
fn unix_timestamp(&self) -> u64
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).