time#

Fully qualified name: carb::time

namespace time#

Functions#

char * asctime_r(const struct tm *tm, char(&buf)[N]) noexcept

Platform independent version of asctime_r: convert a struct tm into a null-terminated string.

char * ctime_r(const time_t *timep, char(&buf)[N]) noexcept

Platform independent version of ctime_r; convert a time_t into a null-terminated string in the user's local time zone.

std::chrono::nanoseconds getMonotonicNanosecondsSinceUnixEpoch(std::chrono::nanoseconds absTimestampNs, std::chrono::nanoseconds steadyTimestampNs=std::chrono::nanoseconds(0))

Calculates the approximate monotonic time in nanoseconds since the Unix epoch.

std::chrono::nanoseconds getMonotonicNanosecondsSinceUnixEpoch()

Retrieves the approximate monotonic time in nanoseconds since the Unix epoch.

std::chrono::nanoseconds getNanosecondsSinceUnixEpoch()

Retrieves the current wallclock time in nanoseconds since the Unix epoch.

std::chrono::nanoseconds getSteadyTimestampNs()

Retrieves the current steady (monotonic) clock timestamp in nanoseconds.

struct tm * gmtime_r(const time_t *timep, struct tm *result) noexcept

Platform independent version of gmtime_r: convert a time_t to UTC component representation.

struct tm * localtime_r(const time_t *timep, struct tm *result) noexcept

Platform independent version of localtime_r: convert a time_t to local timezone component representation.