ARX  1.0
The next-generation open source augmented reality toolkit.
Loading...
Searching...
No Matches
Macros | Functions
time.c File Reference
#include <ARX/ARUtil/time.h>
#include <sys/time.h>
Include dependency graph for time.c:

Macros

#define _POSIX_C_SOURCE   199309L
 

Functions

void arUtilTimeSinceEpoch (uint64_t *sec, uint32_t *usec)
 Get the time in seconds since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). More...
 
double arUtilTimer (void)
 Read the timer. More...
 
void arUtilTimerReset (void)
 Reset the timer. More...
 
void arUtilSleep (int msec)
 Relinquish CPU to the system for specified number of milliseconds. More...
 

Macro Definition Documentation

◆ _POSIX_C_SOURCE

#define _POSIX_C_SOURCE   199309L

Function Documentation

◆ arUtilSleep()

void arUtilSleep ( int  msec)

Relinquish CPU to the system for specified number of milliseconds.

This function calls the native system-provided sleep routine to relinquish CPU control to the system for the specified time.

Parameters
msecSleep time in milliseconds (thousandths of a second).
Since
Not available on Windows Runtime (WinRT).

◆ arUtilTimer()

double arUtilTimer ( void  )

Read the timer.

Returns
Elapsed seconds since last invocation of arUtilTimerReset().
See also
arUtilTimerReset

◆ arUtilTimerReset()

void arUtilTimerReset ( void  )

Reset the timer.

See also
arUtilTimer

◆ arUtilTimeSinceEpoch()

void arUtilTimeSinceEpoch ( uint64_t *  sec,
uint32_t *  usec 
)

Get the time in seconds since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC).

Parameters
secPointer to an unsigned 64-bit interger which will be filled with the seconds portion of the time, or NULL if this value is not required.
secPointer to an unsigned 32-bit interger which will be filled with the microseconds portion the time or NULL if this value is not required. N.B.: The resolution of the returned time is system-specific, and is not guaranteed to have microsecond-resolution.