Time Class Reference
[Server]
#include <Time.hh>
Detailed Description
A Time class.
- Todo:
- : replace this with Boost
Public Member Functions | |
Time () | |
Constructors. | |
Time (const Time &time) | |
Copy constructor. | |
Time (const struct timeval &tv) | |
Constructor. | |
Time (int sec, int usec) | |
Constructor. | |
Time (double time) | |
Constuctor. | |
virtual | ~Time () |
Destructor. | |
void | SetToWallTime () |
Set the time to the wall time. | |
void | Set (int sec, int usec) |
Set to sec and usec. | |
void | Set (double seconds) |
Set to seconds. | |
double | Double () const |
Get the time as a double. | |
const Time & | operator= (const struct timeval &tv) |
Equal opeator. | |
const Time & | operator= (const Time &time) |
Equal opeator. | |
Time | operator+ (const struct timeval &tv) const |
Addition operators. | |
const Time & | operator+= (const struct timeval &tv) |
Addition operators. | |
Time | operator+ (const Time &time) const |
Addition operators. | |
const Time & | operator+= (const Time &time) |
Addition operators. | |
Time | operator- (const struct timeval &tv) const |
Subtraction operator. | |
const Time & | operator-= (const struct timeval &tv) |
Subtraction operator. | |
Time | operator- (const Time &time) const |
Subtraction operator. | |
const Time & | operator-= (const Time &time) |
Subtraction operator. | |
Time | operator * (const struct timeval &tv) const |
Multiplication operators. | |
const Time & | operator *= (const struct timeval &tv) |
Multiplication operators. | |
Time | operator * (const Time &time) const |
Multiplication operators. | |
const Time & | operator *= (const Time &time) |
Multiplication operators. | |
Time | operator/ (const struct timeval &tv) const |
Division operators. | |
const Time & | operator/= (const struct timeval &tv) |
Division operators. | |
Time | operator/ (const Time &time) const |
Division operators. | |
const Time & | operator/= (const Time &time) |
Division operators. | |
bool | operator== (const struct timeval &tv) const |
Equality operators. | |
bool | operator== (const Time &time) const |
Equality operators. | |
bool | operator== (double time) const |
Equality operators. | |
bool | operator!= (const struct timeval &tv) const |
Equality operators. | |
bool | operator!= (const Time &time) const |
Equality operators. | |
bool | operator!= (double time) const |
Equality operators. | |
bool | operator< (const struct timeval &tv) const |
Equality operators. | |
bool | operator< (const Time &time) const |
Equality operators. | |
bool | operator< (double time) const |
Equality operators. | |
bool | operator<= (const struct timeval &tv) const |
Equality operators. | |
bool | operator<= (const Time &time) const |
Equality operators. | |
bool | operator<= (double time) const |
Equality operators. | |
bool | operator> (const struct timeval &tv) const |
Equality operators. | |
bool | operator> (const Time &time) const |
Equality operators. | |
bool | operator> (double time) const |
Equality operators. | |
bool | operator>= (const struct timeval &tv) const |
Equality operators. | |
bool | operator>= (const Time &time) const |
Equality operators. | |
bool | operator>= (double time) const |
Equality operators. | |
Static Public Member Functions | |
static Time | GetWallTime () |
Get the wall time. | |
Public Attributes | |
int | sec |
Seconds. | |
int | usec |
Microseconds. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Time &time) |
Stream operators. |
Constructor & Destructor Documentation
Time | ( | int | sec, | |
int | usec | |||
) |
Constructor.
- Parameters:
-
sec Seconds usec Microseconds
Member Function Documentation
void Set | ( | int | sec, | |
int | usec | |||
) |
Set to sec and usec.
- Parameters:
-
sec Seconds usec micro seconds
void Set | ( | double | seconds | ) |
Set to seconds.
- Parameters:
-
seconds Number of seconds
double Double | ( | ) | const |
The documentation for this class was generated from the following file: