getNanosecondsSinceUnixEpoch#

Fully qualified name: carb::time::getNanosecondsSinceUnixEpoch

Defined in carb/time/Util.h

inline std::chrono::nanoseconds carb::time::getNanosecondsSinceUnixEpoch(
)#

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

Returns:

The current wallclock system time in nanosecnds. This will always be relative to the Unix epoch (midnight January 1, 1970). The values returned here will be subject to NTP wallclock updates. This could result in a newer timestamp returning a smaller value than a previous one. The clock corrections are typically small (on the order of hundreds of milliseconds), but could be large on occasion. If this is problematic, it is the caller’s responsibility to detect and handle such time jumps by comparing to a previous result.