#include <timer.h>
Inherits SG_TRC::CL_Virtual_Record.
Public Member Functions | |
CL_TimerVal (void) | |
Default Constructor. | |
CL_TimerVal (const CL_TimerVal &Time2) | |
Copy Constructor. | |
CL_TimerVal (const CL_Virtual_Record &_Rec2) | |
CL_TimerVal (const ST_Timeval &_Timeval) | |
CL_TimerVal (const long T) | |
Other Constructor. | |
~CL_TimerVal (void) | |
void | Clear () |
Destructor Clear the time value. | |
void | SetToMax () |
Clear the time value. | |
void | SetToMin () |
_SG_TRC_INLINE CL_TimerVal & | operator= (const long T) |
operator =. | |
_SG_TRC_INLINE CL_TimerVal & | operator= (const CL_TimerVal &Time2) |
operator =. | |
_SG_TRC_INLINE CL_TimerVal & | operator= (const ST_Timeval &_Timeval) |
_SG_TRC_INLINE bool | operator!= (const CL_TimerVal &Time2) |
operator !=. | |
_SG_TRC_INLINE bool | operator== (const CL_TimerVal &Time2) |
operator ==. | |
_SG_TRC_INLINE bool | operator< (const CL_TimerVal &Time2) |
operator < for comparing times. | |
_SG_TRC_INLINE bool | operator> (const CL_TimerVal &Time2) |
operator > for comparing times. | |
_SG_TRC_INLINE CL_TimerVal & | operator+= (const CL_TimerVal &Time2) |
operator += for adding times. | |
_SG_TRC_INLINE CL_TimerVal & | operator-= (const CL_TimerVal &Time2) |
operator -= for substracting times. | |
_SG_TRC_INLINE CL_TimerVal & | operator/= (const long T) |
operator /= for dividing times. | |
_SG_TRC_INLINE CL_TimerVal & | operator *= (const long T) |
operator *= for multiplying times. | |
_SG_TRC_INLINE CL_TimerVal | operator+ (const CL_TimerVal &Time2) const |
operator +. | |
_SG_TRC_INLINE CL_TimerVal | operator- (const CL_TimerVal &Time2) const |
operator -. | |
_SG_TRC_INLINE CL_TimerVal | operator/ (const long T) const |
operator /. | |
_SG_TRC_INLINE CL_TimerVal | operator * (const long T) const |
operator *. | |
_SG_TRC_INLINE void | AddTimeUs (const unsigned int _time) |
_SG_TRC_INLINE void | AddTimeMs (const unsigned int _time) |
_SG_TRC_INLINE long | GetValue (void) |
Return the time value stored in Time as a long. | |
_SG_TRC_INLINE std::string | GetStr (bool _Approxmimate=true) const |
_SG_TRC_INLINE void | Print () |
Print the time value as "\n%ds %d µs". | |
_SG_TRC_INLINE void | Run (CL_TimerVal *StopTime=NULL) |
TiXmlElement * | XMLLoad (TiXmlElement *_XML_ROOT, std::string _Name="") |
This fonction read the given XML stream looking for the _Name tag, then reads values. | |
TiXmlElement * | XMLSave (TiXmlElement *_XML_ROOT, std::string _Name="") |
This fonction save CL_TimerVal object into a XML tag called _Name and inserted ibnto the XML stream _XML_ROOT. | |
Public Attributes | |
long | tv_sec |
Time in seconds. | |
long | tv_usec |
Time in microseconds. | |
bool | succes |
int | returnValue |
struct timeval { long tv_sec; /* seconds long tv_usec; /* and microseconds };
Definition at line 126 of file timer.h.
|
Default Constructor.
Definition at line 27 of file timer.cpp. References Clear(). |
|
Copy Constructor.
Definition at line 32 of file timer.cpp. References Clear(). |
|
Definition at line 38 of file timer.cpp. References Clear(). |
|
|
|
Other Constructor.
Definition at line 44 of file timer.cpp. References Clear(). |
|
|
|
|
|
|
|
Destructor Clear the time value.
Reimplemented from SG_TRC::CL_Virtual_Record. Definition at line 53 of file timer.cpp. References returnValue, SetToMin(), and succes. Referenced by CL_TimerVal(), and XMLLoad(). |
|
|
|
Return the time value stored in Time as a long.
Reimplemented from SG_TRC::CL_Virtual_Record. Definition at line 212 of file timer.cpp. Referenced by operator *=(), operator/=(), and SG_TRC::CL_FUNCT_TRC< TracerType >::SaveToSVGFile(). |
|
operator *.
|
|
operator *= for multiplying times.
Reimplemented from SG_TRC::CL_Virtual_Record. Definition at line 162 of file timer.cpp. References GetValue(). |
|
operator !=.
|
|
operator +.
|
|
operator += for adding times.
|
|
operator -.
|
|
operator -= for substracting times.
|
|
operator /.
|
|
operator /= for dividing times.
Reimplemented from SG_TRC::CL_Virtual_Record. Definition at line 155 of file timer.cpp. References GetValue(). |
|
operator < for comparing times.
|
|
|
|
operator =.
|
|
operator =.
Reimplemented from SG_TRC::CL_Virtual_Record. |
|
operator ==.
|
|
operator > for comparing times.
|
|
Print the time value as "\n%ds %d µs".
Reimplemented from SG_TRC::CL_Virtual_Record. |
|
Definition at line 250 of file timer.cpp. References SG_TRC::Ygettimeofday(). Referenced by SG_TRC::StopRecording(). |
|
Clear the time value.
Reimplemented from SG_TRC::CL_Virtual_Record. |
|
Reimplemented from SG_TRC::CL_Virtual_Record. Definition at line 64 of file timer.cpp. References tv_sec, and tv_usec. Referenced by Clear(). |
|
This fonction read the given XML stream looking for the _Name tag, then reads values.
Reimplemented from SG_TRC::CL_Virtual_Record. Definition at line 272 of file timer.cpp. References Clear(). |
|
This fonction save CL_TimerVal object into a XML tag called _Name and inserted ibnto the XML stream _XML_ROOT.
Reimplemented from SG_TRC::CL_Virtual_Record. |
|
Definition at line 176 of file timer.h. Referenced by Clear(). |
|
Definition at line 175 of file timer.h. Referenced by Clear(). |
|
Time in seconds.
Definition at line 130 of file timer.h. Referenced by GetStr(), operator!=(), operator+=(), operator-=(), operator=(), operator==(), operator>(), Print(), SetToMax(), and SetToMin(). |
|
Time in microseconds.
Definition at line 131 of file timer.h. Referenced by GetStr(), operator!=(), operator+=(), operator-=(), operator=(), operator==(), operator>(), Print(), SetToMax(), and SetToMin(). |