V-ART
|
Elapsed time representation. More...
#include <time.h>
Public Member Functions | |
Time () | |
Creates an unitialized object. More... | |
Time (const Time &t) | |
Copy constructor. More... | |
Time (double newSeconds) | |
Cast constructor from double. More... | |
void | Set () |
Set to current time. More... | |
unsigned int | WholeMicroseconds () const |
Returns the number of whole microseconds in elapsed time. More... | |
unsigned int | WholeMilliseconds () const |
Returns the number of whole miliseconds in elapsed time. More... | |
unsigned int | WholeSeconds () const |
Returns the number of whole seconds in elapsed time. More... | |
float | AsFloat () const |
Returns elapsed time (number of seconds) as float. More... | |
Time | operator- (const Time &initialTime) const |
bool | operator>= (const Time &t) const |
bool | operator<= (const Time &t) const |
bool | operator> (const Time &t) const |
bool | operator< (const Time &t) const |
void | operator+= (double secs) |
void | operator-= (const Time &t) |
Static Public Member Functions | |
static const Time & | NOW () |
Returns current time. More... | |
Protected Attributes | |
double | seconds |
Number of seconds in elapsed time. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &output, const Time &t) |
Elapsed time representation.
Time represents the length of a time interval.
VART::Time::Time | ( | double | newSeconds | ) |
|
inline |
|
static |
|
inline |
VART::Time VART::Time::operator- | ( | const Time & | initialTime | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void VART::Time::Set | ( | ) |
Set to current time.
Makes the active object hold the elapsed time since "the epoch". In sloppy terms, it could be said that this method set the active object to hold current time. "Epoch" is some fixed point in time determined by the operating system (usually 0h of Jan 1, 1970).
Definition at line 49 of file time.cpp.
Referenced by VART::Action::Move(), and NOW().
unsigned int VART::Time::WholeMicroseconds | ( | ) | const |
unsigned int VART::Time::WholeMilliseconds | ( | ) | const |
unsigned int VART::Time::WholeSeconds | ( | ) | const |
|
friend |
|
protected |
Number of seconds in elapsed time.
Definition at line 57 of file time.h.
Referenced by AsFloat(), operator+=(), operator-(), operator-=(), operator<(), VART::operator<<(), operator<=(), operator>(), and operator>=().