Time units as distinct SIGNED INTEGER types.
More...
#include <_src_base_time.hh>
List of all members.
Public Types |
| typedef TimeInt | Int |
Public Member Functions |
| | Milliseconds (void) |
| | Milliseconds (Int units) |
| Int | INT (void) const |
| fpx | FPX (void) const |
| Milliseconds & | operator+= (const Milliseconds &src) |
| Milliseconds & | operator-= (const Milliseconds &src) |
Private Attributes |
| Int | mUnits |
Friends |
| Milliseconds | operator+ (const Milliseconds &a, const Milliseconds &b) |
| Milliseconds | operator- (const Milliseconds &a, const Milliseconds &b) |
| Milliseconds | operator* (const Milliseconds &a, const Milliseconds &b) |
| Milliseconds | operator/ (const Milliseconds &a, const Milliseconds &b) |
| bool | operator== (const Milliseconds &a, const Milliseconds &b) |
| bool | operator!= (const Milliseconds &a, const Milliseconds &b) |
| bool | operator< (const Milliseconds &a, const Milliseconds &b) |
| bool | operator<= (const Milliseconds &a, const Milliseconds &b) |
| bool | operator> (const Milliseconds &a, const Milliseconds &b) |
| bool | operator>= (const Milliseconds &a, const Milliseconds &b) |
| std::ostream & | operator<< (std::ostream &strm, const Milliseconds &t) |
| std::istream & | operator>> (std::istream &strm, Milliseconds &milliseconds) |
Detailed Description
Time units as distinct SIGNED INTEGER types.
TimeInt is SIGNED since subtraction of time units could result in a negative value. 64-bits of milliseconds can define 300 million years (less than FreeBSD's uptime). These classes would be much simpler based on an fp type but none are wide enough.
Milliseconds class is elaborate since it is used the most.
Member Typedef Documentation
Constructor & Destructor Documentation
| base::Milliseconds::Milliseconds |
( |
void |
|
) |
[inline] |
| base::Milliseconds::Milliseconds |
( |
Int |
units |
) |
[inline, explicit] |
Member Function Documentation
| fpx base::Milliseconds::FPX |
( |
void |
|
) |
const [inline] |
| Int base::Milliseconds::INT |
( |
void |
|
) |
const [inline] |
Friends And Related Function Documentation
| std::ostream& operator<< |
( |
std::ostream & |
strm, |
|
|
const Milliseconds & |
t | |
|
) |
| | [friend] |
| std::istream& operator>> |
( |
std::istream & |
strm, |
|
|
Milliseconds & |
milliseconds | |
|
) |
| | [friend] |
Member Data Documentation
The documentation for this struct was generated from the following file: