HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SYS_Time.h File Reference
#include "SYS_API.h"
#include "SYS_Types.h"
#include <time.h>
#include <sys/time.h>
+ Include dependency graph for SYS_Time.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct timeval SYS_TimeVal
 

Functions

SYS_API int SYSgettimeofday (SYS_TimeVal *tval)
 
SYS_API time_t SYSclock ()
 
SYS_API fpreal SYStime ()
 
SYS_API fpreal SYStime (const SYS_TimeVal &tval)
 Return the number of seconds expressed in the given time value. More...
 
SYS_API void SYSrusage (SYS_TimeVal &user, SYS_TimeVal &sys)
 
fpreal64 SYStimeDiff (const SYS_TimeVal &end, const SYS_TimeVal &start)
 

Typedef Documentation

typedef struct timeval SYS_TimeVal

Definition at line 31 of file SYS_Time.h.

Function Documentation

SYS_API time_t SYSclock ( )

Return a number of milliseconds since the process started. This function will wrap values every 50 days or so.

SYS_API int SYSgettimeofday ( SYS_TimeVal tval)

SYSgettimeofday() fills in tval with the "current" time, which cannot be given any particular meaning. These values are only useful for comparing against each other.

SYS_API void SYSrusage ( SYS_TimeVal user,
SYS_TimeVal sys 
)

Return the system resource usage times (user and system) for the current process.

SYS_API fpreal SYStime ( )

Return the number of seconds since some arbitrary start time as a real number. Returns -1 if there was an error computing the time.

SYS_API fpreal SYStime ( const SYS_TimeVal tval)

Return the number of seconds expressed in the given time value.

fpreal64 SYStimeDiff ( const SYS_TimeVal end,
const SYS_TimeVal start 
)
inline

Return the number of seconds (with floating point precision) between the start and end times. The end time should be later than the start time.

Definition at line 58 of file SYS_Time.h.