DataDirector API
Public Member Functions | List of all members
Timer Class Reference

#include <timer.h>

Public Member Functions

DISTI_EXPORT Timer (void)
 
DISTI_EXPORT void Reset (void)
 
virtual DISTI_EXPORT unsigned long ElapsedMilliseconds (void)
 
virtual DISTI_EXPORT unsigned long ElapsedMicroseconds (void)
 
virtual DISTI_EXPORT unsigned long ElapsedSeconds (void)
 
virtual DISTI_EXPORT double ElapsedSecondsDouble (void)
 
virtual DISTI_EXPORT unsigned long GetCurrentTimeInSeconds (void)
 
virtual DISTI_EXPORT void GetTimeOfDay (unsigned long *sec, unsigned long *usec)
 
virtual DISTI_EXPORT void GetTimeOfDay (INT_64 *usec)
 
virtual DISTI_EXPORT void WaitMilliseconds (unsigned long milli)
 
virtual DISTI_EXPORT void WaitMicroseconds (unsigned long micro)
 
virtual DISTI_EXPORT unsigned long DifferenceInMicroseconds (unsigned long sec, unsigned long usec)
 
virtual DISTI_EXPORT double DifferenceInSeconds (unsigned long sec, unsigned long usec)
 
virtual DISTI_EXPORT unsigned long DIS_Timestamp (void)
 

Detailed Description

The Timer class

Constructor & Destructor Documentation

DISTI_EXPORT Timer ( void  )

Timer constructor.

Member Function Documentation

virtual DISTI_EXPORT unsigned long DifferenceInMicroseconds ( unsigned long  sec,
unsigned long  usec 
)
virtual

Get the difference between a time value and when the "epoch time" began

Parameters
secTime in seconds to compare to "epoch time"
usecTime in microseconds to compare to "epoch time"
Returns
Return the difference between the time parameters, and the "epoch time", in Microseconds
virtual DISTI_EXPORT double DifferenceInSeconds ( unsigned long  sec,
unsigned long  usec 
)
virtual

Get the difference between a time value and when the "epoch time" began

Parameters
secTime in seconds to compare to "epoch time"
usecTime in microseconds to compare to "epoch time"
Returns
Return the difference between the time parameters, and the "epoch time", in Seconds
virtual DISTI_EXPORT unsigned long DIS_Timestamp ( void  )
virtual

Create a DIS timestamp based on the current time of day

Returns
Return a DIS timestamp
virtual DISTI_EXPORT unsigned long ElapsedMicroseconds ( void  )
virtual

Get the number of microseconds elapsed since the "epoch time" began

Returns
Return the elapsed Microseconds since the beginning of the epoch
virtual DISTI_EXPORT unsigned long ElapsedMilliseconds ( void  )
virtual

Get the number of milliseconds elapsed since the "epoch time" began

Returns
Return the elapsed milliseconds since the beginning of the epoch
virtual DISTI_EXPORT unsigned long ElapsedSeconds ( void  )
virtual

Get the number of seconds elapsed since the "epoch time" began

Returns
Return the number of seconds since the beginning of the epoch
virtual DISTI_EXPORT double ElapsedSecondsDouble ( void  )
virtual

Get the number of seconds elapsed since the "epoch time" began

Returns
The number of seconds elapsed since the beginning of the epoch
virtual DISTI_EXPORT unsigned long GetCurrentTimeInSeconds ( void  )
virtual

Get the number of seconds elapsed since 01/01/1970, "wall clock"

Returns
Return the number of seconds
virtual DISTI_EXPORT void GetTimeOfDay ( unsigned long *  sec,
unsigned long *  usec 
)
virtual

Get the number of seconds elapsed since 01/01/1970, and the number of microseconds elapsed in the current second

Parameters
secReturn the number of seconds elapsed since 01/01/1970
usecReturn the factional second in microseconds
virtual DISTI_EXPORT void GetTimeOfDay ( INT_64 *  usec)
virtual

Get number of microseconds elapsed since 01/01/1970

Parameters
usecReturn number of microseconds elapsed
DISTI_EXPORT void Reset ( void  )

Reset the timer so current time is the time base, reset "epoch time" to the current time

virtual DISTI_EXPORT void WaitMicroseconds ( unsigned long  micro)
virtual

Cause the process (or thread) to sleep for the specified number of microseconds. Clock time continues, this pauses the thread, not the clock.

Parameters
microHow long to sleep im micoseconds
virtual DISTI_EXPORT void WaitMilliseconds ( unsigned long  milli)
virtual

Cause the process (or thread) to sleep for the specified number of milliseconds. Clock time continues, this pauses the thread, not the clock.

Parameters
milliHow long to sleep in milliseconds.

The documentation for this class was generated from the following file: