tTime Struct Reference

time structure More...

List of all members.

Public Member Functions

 tTime ()
void Normalize ()
 makes sure microseconds is between 0 and NORMALIZER-1
tTime operator+ (const tTime &other)
tTime operator- (const tTime &other)

Public Attributes

int microseconds
int seconds
 microseconds


Detailed Description

time structure

Definition at line 44 of file tSysTime.cpp.


Constructor & Destructor Documentation

tTime::tTime (  )  [inline]

Definition at line 51 of file tSysTime.cpp.

00051 : microseconds(0), seconds(0){}


Member Function Documentation

void tTime::Normalize (  )  [inline]

makes sure microseconds is between 0 and NORMALIZER-1

Definition at line 54 of file tSysTime.cpp.

References microseconds, NORMALIZER, and seconds.

Referenced by GetTime(), operator+(), and operator-().

00055     {
00056         int overflow = microseconds / NORMALIZER;
00057         microseconds -= overflow * NORMALIZER;
00058         seconds += overflow;
00059 
00060         while ( microseconds < 0 )
00061         {
00062             microseconds += NORMALIZER;
00063             seconds --;
00064         }
00065     }

Here is the caller graph for this function:

tTime tTime::operator+ ( const tTime other  )  [inline]

Definition at line 67 of file tSysTime.cpp.

References microseconds, Normalize(), and seconds.

00068     {
00069         tTime ret;
00070         ret.microseconds = other.microseconds + microseconds;
00071         ret.seconds = other.seconds + seconds;
00072 
00073         ret.Normalize();
00074         return ret;
00075     }

Here is the call graph for this function:

tTime tTime::operator- ( const tTime other  )  [inline]

Definition at line 77 of file tSysTime.cpp.

References microseconds, Normalize(), and seconds.

00078     {
00079         tTime ret;
00080         ret.microseconds = -other.microseconds + microseconds;
00081         ret.seconds = -other.seconds + seconds;
00082 
00083         ret.Normalize();
00084         return ret;
00085     }

Here is the call graph for this function:


Member Data Documentation

int tTime::microseconds

Definition at line 46 of file tSysTime.cpp.

Referenced by TimeArchiver< Archiver >::Archive(), GetTime(), Normalize(), operator+(), operator-(), tAdvanceFrame(), tAdvanceFrameSys(), tDelayForce(), tRealSysTimeFloat(), and tSysTimeFloat().

int tTime::seconds

microseconds

Definition at line 47 of file tSysTime.cpp.

Referenced by TimeArchiver< Archiver >::Archive(), GetTime(), Normalize(), operator+(), operator-(), tAdvanceFrame(), tAdvanceFrameSys(), tRealSysTimeFloat(), and tSysTimeFloat().


The documentation for this struct was generated from the following file:
Generated on Sat Mar 15 23:59:49 2008 for Armagetron Advanced by  doxygen 1.5.4