Functions
fn microTimestamp() i64
Get a calendar timestamp, in microseconds, relative to UTC 1970-01-01. Precisio…
Get a calendar timestamp, in microseconds, relative to UTC 1970-01-01. Precision of timing depends on the hardware and operating system. The return value is signed because it is possible to have a date that is before the epoch. See
std.os.clock_gettime
for a POSIX timestamp.fn milliTimestamp() i64
Get a calendar timestamp, in milliseconds, relative to UTC 1970-01-01. Precisio…
Get a calendar timestamp, in milliseconds, relative to UTC 1970-01-01. Precision of timing depends on the hardware and operating system. The return value is signed because it is possible to have a date that is before the epoch. See
std.os.clock_gettime
for a POSIX timestamp.fn nanoTimestamp() i128
Get a calendar timestamp, in nanoseconds, relative to UTC 1970-01-01. Precision…
Get a calendar timestamp, in nanoseconds, relative to UTC 1970-01-01. Precision of timing depends on the hardware and operating system. On Windows this has a maximum granularity of 100 nanoseconds. The return value is signed because it is possible to have a date that is before the epoch. See
std.os.clock_gettime
for a POSIX timestamp.fn sleep(nanoseconds: u64) void
Spurious wakeups are possible and no precision of timing is guaranteed.
fn timestamp() i64
Get a calendar timestamp, in seconds, relative to UTC 1970-01-01. Precision of …
Get a calendar timestamp, in seconds, relative to UTC 1970-01-01. Precision of timing depends on the hardware and operating system. The return value is signed because it is possible to have a date that is before the epoch. See
std.os.clock_gettime
for a POSIX timestamp.
Values
ms_per_day | type | |
ms_per_hour | type | |
ms_per_min | type | |
ms_per_s | comptime_int | |
ms_per_week | type | |
ns_per_day | type | |
ns_per_hour | type | |
ns_per_min | type | |
ns_per_ms | type | |
ns_per_s | type | |
ns_per_us | comptime_int | |
ns_per_week | type | |
s_per_day | type | |
s_per_hour | type | |
s_per_min | comptime_int | |
s_per_week | type | |
us_per_day | type | |
us_per_hour | type | |
us_per_min | type | |
us_per_ms | comptime_int | |
us_per_s | type | |
us_per_week | type |