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