|
Thunderbots Project
|
#include <timestamp.h>


Public Member Functions | |
| Timestamp () | |
| bool | operator== (const Timestamp &other) const |
| bool | operator!= (const Timestamp &other) const |
| bool | operator< (const Timestamp &other) const |
| bool | operator<= (const Timestamp &other) const |
| bool | operator> (const Timestamp &other) const |
| bool | operator>= (const Timestamp &other) const |
| Timestamp | operator+ (const Duration &duration) const |
| Timestamp | operator- (const Duration &duration) const |
| Duration | operator- (const Timestamp ×tamp) const |
Public Member Functions inherited from Time | |
| Time () | |
| double | toSeconds () const |
| double | toMilliseconds () const |
| virtual | ~Time ()=0 |
Static Public Member Functions | |
| static const Timestamp | fromSeconds (double seconds) |
| static const Timestamp | fromMilliseconds (double milliseconds) |
| static const Timestamp | fromTimestampProto (const TbotsProto::Timestamp ×tamp_proto) |
Friends | |
| std::ostream & | operator<< (std::ostream &output_stream, const Timestamp &time) |
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 Timestamp class built around doubles. This Timestamp is intended to represent the t_capture timestamps we receive from the SSL Vision system. These t_capture values are monotonic (meaning they are always positive and always increase), and are relative to the "epoch time" defined by SSL Vision. This "epoch" is when SSL Vision starts up and begins streaming data. Therefore, these timestamps are not absolute "wall clock" time, but points in time relative to when the SSL Vision program started. They can and should be used to timestamp all data received from SSL Vision and propagated throughout the system in order to calculate time differences (durations), velocities, and other time-dependent values.
|
static |
|
static |
|
static |
| bool operator!= | ( | const Timestamp & | other | ) | const |
Compares Timestamps for inequality
| other | the Timestamp to compare with for inequality |
| bool operator< | ( | const Timestamp & | other | ) | const |
| bool operator<= | ( | const Timestamp & | other | ) | const |
| bool operator== | ( | const Timestamp & | other | ) | const |
Compares Timestamps for equality. Timestamps are considered equal if their values in seconds are within EPSILON from one another.
| other | the Timestamp to compare with for equality |
| bool operator> | ( | const Timestamp & | other | ) | const |
| bool operator>= | ( | const Timestamp & | other | ) | const |
|
friend |
Implements the << operator for printing
| ostream | The stream to print to |
| time | The time to print |