Types

Namespaces

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.