Marsyas  0.5.0-beta1
Public Member Functions
TmRealTime Class Reference

TmRealTime reads the getlocaltime() function, system clock to get the current number of microseconds. More...

#include <TmRealTime.h>

Inherits TmTimer.

Public Member Functions

mrs_natural getMicroSeconds ()
 get the system microseconds count
mrs_natural intervalsize (std::string interval)
 convert the given interval into a number of micro seconds.
mrs_natural readTimeSrc ()
 get the difference between the current source control value and its value since it was last read. Does not currently work for Windows TODO! architecture as it relies on the Unix function gettimeofday().
 TmRealTime ()
 empty constructor. Given the default name: System as in "TmRealTime/System"
 TmRealTime (std::string name)
 named constructor. Given the identifier "TmRealTime/name"
 TmRealTime (const TmRealTime &t)
 copy constructor
void updtime ()
 updtime from TmTimer is overridden to directly set the cur_time_ with the system time rather than an offset since last read. This should avoid possible accumulation of error.
 ~TmRealTime ()

Detailed Description

TmRealTime reads the getlocaltime() function, system clock to get the current number of microseconds.

Author:
Neil Burroughs inb@cs.uvic.ca

Definition at line 40 of file TmRealTime.h.


Constructor & Destructor Documentation

empty constructor. Given the default name: System as in "TmRealTime/System"

Definition at line 27 of file TmRealTime.cpp.

TmRealTime ( std::string  name)

named constructor. Given the identifier "TmRealTime/name"

Parameters:
namea unique name to call this timer

Definition at line 33 of file TmRealTime.cpp.

TmRealTime ( const TmRealTime t)

copy constructor

Parameters:
ttimer to copy

Definition at line 39 of file TmRealTime.cpp.

~TmRealTime ( )

Definition at line 44 of file TmRealTime.cpp.


Member Function Documentation

mrs_natural getMicroSeconds ( )

get the system microseconds count

Returns:
the microseconds count

Definition at line 47 of file TmRealTime.cpp.

mrs_natural intervalsize ( std::string  interval) [virtual]

convert the given interval into a number of micro seconds.

The interval must be defined in real time units: us, ms, s, m, h, d.

Parameters:
intervalthe interval to calculate
Returns:
the number of micro seconds contained in the interval

Implements TmTimer.

Definition at line 81 of file TmRealTime.cpp.

mrs_natural readTimeSrc ( ) [virtual]

get the difference between the current source control value and its value since it was last read. Does not currently work for Windows TODO! architecture as it relies on the Unix function gettimeofday().

Returns:
the count since last read

Implements TmTimer.

Definition at line 65 of file TmRealTime.cpp.

void updtime ( ) [virtual]

updtime from TmTimer is overridden to directly set the cur_time_ with the system time rather than an offset since last read. This should avoid possible accumulation of error.

Reimplemented from TmTimer.

Definition at line 75 of file TmRealTime.cpp.


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