|
Thunderbots Project
|
#include <duration.h>


Public Member Functions | |
| Duration () | |
| bool | operator== (const Duration &other) const |
| bool | operator!= (const Duration &other) const |
| bool | operator< (const Duration &other) const |
| bool | operator<= (const Duration &other) const |
| bool | operator> (const Duration &other) const |
| bool | operator>= (const Duration &other) const |
| Duration | operator+ (const Duration &duration) const |
| Duration | operator- (const Duration &duration) const |
| Duration & | operator+= (const Duration &duration) |
| Duration & | operator-= (const Duration &duration) |
Public Member Functions inherited from Time | |
| Time () | |
| double | toSeconds () const |
| double | toMilliseconds () const |
| virtual | ~Time ()=0 |
Static Public Member Functions | |
| static const Duration | fromSeconds (double seconds) |
| static const Duration | fromMilliseconds (double milliseconds) |
Friends | |
| std::ostream & | operator<< (std::ostream &output_stream, const Duration &duration) |
Additional Inherited Members | |
Static Public Attributes inherited from Time | |
| static constexpr double | EPSILON = 1e-15 |
Protected Member Functions inherited from Time | |
| Time (double time_seconds) | |
Protected Attributes inherited from Time | |
| double | time_in_seconds |
A simple Duration class built around doubles. It is meant to represent some duration of time
|
static |
|
static |
| bool operator!= | ( | const Duration & | other | ) | const |
Compares Durations for inequality
| other | the Duration to compare with for inequality |
| bool operator< | ( | const Duration & | other | ) | const |
| bool operator<= | ( | const Duration & | other | ) | const |
| bool operator== | ( | const Duration & | other | ) | const |
Compares Durations for equality. Durations are considered equal if their values in seconds are within EPSILON from one another.
| other | the Duration to compare with for equality |
| bool operator> | ( | const Duration & | other | ) | const |
| bool operator>= | ( | const Duration & | other | ) | const |
|
friend |
Implements the << operator for printing
| ostream | The stream to print to |
| time | The time to print |