CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
Clock Functions

Functions

int64 clockWall ()
 
int64 clockWallLocal ()
 
int64 clockTimer ()
 

Detailed Description

Functions for obtaining current time from system clocks.

Function Documentation

◆ clockTimer()

int64 clockTimer ( )

Gets a monotonically increasing time for measuring intervals.

Returns a monotonically increasing time that is guaranteed to not go backwards or skip around when the clock is reset. The actual value does not have any particular meaning other than being measured in microseconds, and may not be unique across operating system restarts. This should be used for timing events and measuring durations.

Returns
Monotonic timestamp in microseconds

◆ clockWall()

int64 clockWall ( )

Gets the current "wall time" (system time).

Returns the current system time in the Julian date epoch format. This time may jump forward or backward if the system clock is adjusted.

Returns
Number of microseconds since the Julian date epoch

◆ clockWallLocal()

int64 clockWallLocal ( )

Gets the current wall time adjusted for the local time zone.

Similar to clockWall(), but adjusts the time for local time zone rules currently in effect. This is not a proper time reference and may be discontinuous – it is intended only for displaying the current date and time to users.

Returns
Number of microseconds since the Julian date epoch, in local time