Skip to main content

read_clock_timestamp

Function read_clock_timestamp 

Source
pub fn read_clock_timestamp(account: &AccountView) -> Result<i64, ProgramError>
Expand description

Read just the unix_timestamp from the Clock sysvar.

let now = read_clock_timestamp(clock_account)?;
check_not_expired(now, listing.expiry)?;