Seems like there are two ways of retrieving Clock according Solana docs:
Passing
SYSVAR_CLOCK_PUBKEY
into an instructionlet clock = Clock::from_account_info(&sysvar_clock_pubkey)?; let current_timestamp = clock.unix_timestamp;
Accessing Clock directly inside an instruction.
let clock = Clock::get()?; let current_timestamp = clock.unix_timestamp;
SeemsLooks like we shouldn't use external libs for this.