T-EMU  2
The Terma Emulator
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
Time.h File Reference
#include <stdint.h>
Include dependency graph for Time.h:

Go to the source code of this file.

Functions

uint64_t temu_timeGetMonotonicWct (void)
 
uint64_t temu_timeGetThreadWct (void)
 
uint64_t temu_timeGetCurrentSrtNanos (void *Obj)
 

Function Documentation

uint64_t temu_timeGetCurrentSrtNanos ( void *  Obj)
uint64_t temu_timeGetMonotonicWct ( void  )

Get monotonic time in nanoseconds.

The monotonic time is relative since some epoch of undefined start, but it is monotonic, unaffected by adjustments due to leap seconds, setting of the system clock, etc.

This function is primarily useful for doing performance measurements since the time returned is relative to an undefined point (although that undefined point will be consistent while the program is running).

In practice, on systems with clock_gettime() implemented, this function returns the timespec converted to nanoseconds, but on systems without clock_gettime(), e.g. Darwin and Windows, the function will only ensure that some notion of monotonic nanoseconds are returned. In Darwin for example, this results in a monotonic time returned which is relative to the first call to the function.

uint64_t temu_timeGetThreadWct ( void  )