17 #ifndef CYBER_TIME_TIME_H_ 18 #define CYBER_TIME_TIME_H_ 36 explicit Time(uint64_t nanoseconds);
37 explicit Time(
int nanoseconds);
38 explicit Time(
double seconds);
39 Time(uint32_t seconds, uint32_t nanoseconds);
106 uint64_t nanoseconds_ = 0;
114 #endif // CYBER_TIME_TIME_H_ Duration operator-(const Time &rhs) const
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
static void SleepUntil(const Time &time)
Sleep Until time.
std::ostream & operator<<(std::ostream &os, const Duration &rhs)
static const Time MAX
Definition: time.h:33
Time & operator+=(const Duration &rhs)
bool operator<(const Time &rhs) const
Time & operator=(const Time &other)
bool operator>(const Time &rhs) const
bool operator!=(const Time &rhs) const
static const Time MIN
Definition: time.h:34
bool operator>=(const Time &rhs) const
double ToSecond() const
convert time to second.
bool operator<=(const Time &rhs) const
bool IsZero() const
determine if time is 0
uint64_t ToNanosecond() const
convert time to nanosecond.
Time & operator-=(const Duration &rhs)
static Time Now()
get the current time.
std::string ToString() const
convert time to a string.
bool operator==(const Time &rhs) const
Cyber has builtin time type Time.
Definition: time.h:31
Definition: duration.h:26
Time operator+(const Duration &rhs) const
uint64_t ToMicrosecond() const
convert time to microsecond (us).