#include <TuioTime.h>
List of all members.
Detailed Description
The TuioTime class is a simple structure that is used to reprent the time that has elapsed since the session start. The time is internally represented as seconds and fractions of microseconds which should be more than sufficient for gesture related timing requirements. Therefore at the beginning of a typical TUIO session the static method initSession() will set the reference time for the session. Another important static method getSessionTime will return a TuioTime object representing the time elapsed since the session start. The class also provides various addtional convience method, which allow some simple time arithmetics.
- Author:
- Martin Kaltenbrunner
- Version:
- 1.4
Constructor & Destructor Documentation
TUIO::TuioTime::TuioTime |
( |
) |
[inline] |
The default constructor takes no arguments and sets the Seconds and Microseconds attributes of the newly created TuioTime both to zero.
TUIO::TuioTime::~TuioTime |
( |
) |
[inline] |
The destructor is doing nothing in particular.
TUIO::TuioTime::TuioTime |
( |
long |
msec ) |
[inline] |
This constructor takes the provided time represented in total Milliseconds and assigs this value to the newly created TuioTime.
- Parameters:
-
msec | the total time in Millseconds |
TUIO::TuioTime::TuioTime |
( |
long |
sec, |
|
|
long |
usec |
|
) |
| [inline] |
This constructor takes the provided time represented in Seconds and Microseconds and assigs these value to the newly created TuioTime.
- Parameters:
-
sec | the total time in seconds |
usec | the microseconds time component |
Member Function Documentation
long TUIO::TuioTime::getMicroseconds |
( |
) |
[inline] |
Returns the TuioTime Microseconds component.
- Returns:
- the TuioTime Microseconds component
long TUIO::TuioTime::getSeconds |
( |
) |
[inline] |
TuioTime TuioTime::getSessionTime |
( |
) |
[static] |
Returns the present TuioTime representing the time since session start.
- Returns:
- the present TuioTime representing the time since session start
TuioTime TuioTime::getStartTime |
( |
) |
[static] |
Returns the absolut TuioTime representing the session start.
- Returns:
- the absolut TuioTime representing the session start
TuioTime TuioTime::getSystemTime |
( |
) |
[static] |
Returns the absolut TuioTime representing the current system time.
- Returns:
- the absolut TuioTime representing the current system time
long TUIO::TuioTime::getTotalMilliseconds |
( |
) |
[inline] |
Returns the total TuioTime in Milliseconds.
- Returns:
- the total TuioTime in Milliseconds
void TuioTime::initSession |
( |
) |
[static] |
This static method globally resets the TUIO session time.
bool TUIO::TuioTime::operator!= |
( |
TuioTime |
ttime ) |
[inline] |
Takes a TuioTime argument and compares the provided TuioTime to the private Seconds and Microseconds attributes.
- Parameters:
-
- Returns:
- true if the two TuioTime have differnt Seconds or Microseconds attributes
Sums the provided TuioTime to the private Seconds and Microseconds attributes.
- Parameters:
-
- Returns:
- the sum of this TuioTime with the provided TuioTime argument
TuioTime TUIO::TuioTime::operator+ |
( |
long |
us ) |
[inline] |
Sums the provided time value represented in total Microseconds to this TuioTime.
- Parameters:
-
us | the total time to add in Microseconds |
- Returns:
- the sum of this TuioTime with the provided argument in microseconds
Subtracts the provided TuioTime from the private Seconds and Microseconds attributes.
- Parameters:
-
- Returns:
- the subtraction result of this TuioTime minus the provided TuioTime
TuioTime TUIO::TuioTime::operator- |
( |
long |
us ) |
[inline] |
Subtracts the provided time represented in Microseconds from the private Seconds and Microseconds attributes.
- Parameters:
-
us | the total time to subtract in Microseconds |
- Returns:
- the subtraction result of this TuioTime minus the provided time in Microseconds
void TUIO::TuioTime::operator= |
( |
TuioTime |
ttime ) |
[inline] |
Assigns the provided TuioTime to the private Seconds and Microseconds attributes.
- Parameters:
-
bool TUIO::TuioTime::operator== |
( |
TuioTime |
ttime ) |
[inline] |
Takes a TuioTime argument and compares the provided TuioTime to the private Seconds and Microseconds attributes.
- Parameters:
-
- Returns:
- true if the two TuioTime have equal Seconds and Microseconds attributes
void TUIO::TuioTime::reset |
( |
) |
[inline] |
Resets the seconds and micro_seconds attributes to zero.
The documentation for this class was generated from the following files: