unixTime

Signature

function unixTime() external returns (uint milliseconds);

Description

Returns the time since unix epoch in milliseconds.

Examples

uint start = vm.unixTime(); vm.sleep(10_000); // Halts execution for 10 seconds uint end = vm.unixTime(); assertEq(end - start, 10_000);