#include <time_delta.h>
Definition at line 29 of file time_delta.h.
◆ TimeDelta()
constexpr fml::TimeDelta::TimeDelta |
( |
| ) |
|
|
constexprdefault |
◆ FromMicroseconds()
static constexpr TimeDelta fml::TimeDelta::FromMicroseconds |
( |
int64_t |
micros | ) |
|
|
inlinestaticconstexpr |
Definition at line 43 of file time_delta.h.
43 {
45 }
static constexpr TimeDelta FromNanoseconds(int64_t nanos)
◆ FromMilliseconds()
static constexpr TimeDelta fml::TimeDelta::FromMilliseconds |
( |
int64_t |
millis | ) |
|
|
inlinestaticconstexpr |
Definition at line 46 of file time_delta.h.
46 {
48 }
static constexpr TimeDelta FromMicroseconds(int64_t micros)
◆ FromMillisecondsF()
static constexpr TimeDelta fml::TimeDelta::FromMillisecondsF |
( |
double |
millis | ) |
|
|
inlinestaticconstexpr |
◆ FromNanoseconds()
static constexpr TimeDelta fml::TimeDelta::FromNanoseconds |
( |
int64_t |
nanos | ) |
|
|
inlinestaticconstexpr |
Definition at line 40 of file time_delta.h.
40 {
42 }
constexpr TimeDelta()=default
◆ FromSeconds()
static constexpr TimeDelta fml::TimeDelta::FromSeconds |
( |
int64_t |
seconds | ) |
|
|
inlinestaticconstexpr |
Definition at line 49 of file time_delta.h.
49 {
51 }
static constexpr TimeDelta FromMilliseconds(int64_t millis)
◆ FromSecondsF()
static constexpr TimeDelta fml::TimeDelta::FromSecondsF |
( |
double |
seconds | ) |
|
|
inlinestaticconstexpr |
◆ FromTimespec()
static constexpr TimeDelta fml::TimeDelta::FromTimespec |
( |
struct timespec |
ts | ) |
|
|
inlinestaticconstexpr |
Definition at line 106 of file time_delta.h.
106 {
109 }
static constexpr TimeDelta FromSeconds(int64_t seconds)
◆ Max()
static constexpr TimeDelta fml::TimeDelta::Max |
( |
| ) |
|
|
inlinestaticconstexpr |
Definition at line 37 of file time_delta.h.
37 {
39 }
static float max(float r, float g, float b)
◆ Min()
static constexpr TimeDelta fml::TimeDelta::Min |
( |
| ) |
|
|
inlinestaticconstexpr |
Definition at line 34 of file time_delta.h.
34 {
36 }
static float min(float r, float g, float b)
◆ operator!=()
bool fml::TimeDelta::operator!= |
( |
TimeDelta |
other | ) |
const |
|
inline |
Definition at line 100 of file time_delta.h.
100{ return delta_ != other.delta_; }
◆ operator%()
◆ operator*()
constexpr TimeDelta fml::TimeDelta::operator* |
( |
int64_t |
multiplier | ) |
const |
|
inlineconstexpr |
◆ operator+()
◆ operator-()
◆ operator/() [1/2]
constexpr TimeDelta fml::TimeDelta::operator/ |
( |
int64_t |
divisor | ) |
const |
|
inlineconstexpr |
◆ operator/() [2/2]
constexpr int64_t fml::TimeDelta::operator/ |
( |
TimeDelta |
other | ) |
const |
|
inlineconstexpr |
Definition at line 87 of file time_delta.h.
87 {
88 return delta_ / other.delta_;
89 }
◆ operator<()
bool fml::TimeDelta::operator< |
( |
TimeDelta |
other | ) |
const |
|
inline |
Definition at line 101 of file time_delta.h.
101{ return delta_ < other.delta_; }
◆ operator<=()
bool fml::TimeDelta::operator<= |
( |
TimeDelta |
other | ) |
const |
|
inline |
Definition at line 102 of file time_delta.h.
102{ return delta_ <= other.delta_; }
◆ operator==()
bool fml::TimeDelta::operator== |
( |
TimeDelta |
other | ) |
const |
|
inline |
Definition at line 99 of file time_delta.h.
99{ return delta_ == other.delta_; }
◆ operator>()
bool fml::TimeDelta::operator> |
( |
TimeDelta |
other | ) |
const |
|
inline |
Definition at line 103 of file time_delta.h.
103{ return delta_ > other.delta_; }
◆ operator>=()
bool fml::TimeDelta::operator>= |
( |
TimeDelta |
other | ) |
const |
|
inline |
Definition at line 104 of file time_delta.h.
104{ return delta_ >= other.delta_; }
◆ ToMicroseconds()
constexpr int64_t fml::TimeDelta::ToMicroseconds |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 62 of file time_delta.h.
constexpr int64_t ToNanoseconds() const
◆ ToMicrosecondsF()
constexpr double fml::TimeDelta::ToMicrosecondsF |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 67 of file time_delta.h.
67{ return delta_ / 1000.0; }
◆ ToMilliseconds()
constexpr int64_t fml::TimeDelta::ToMilliseconds |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 63 of file time_delta.h.
constexpr int64_t ToMicroseconds() const
◆ ToMillisecondsF()
constexpr double fml::TimeDelta::ToMillisecondsF |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 68 of file time_delta.h.
68 {
69 return delta_ / (1000.0 * 1000.0);
70 }
◆ ToNanoseconds()
constexpr int64_t fml::TimeDelta::ToNanoseconds |
( |
| ) |
const |
|
inlineconstexpr |
◆ ToNanosecondsF()
constexpr double fml::TimeDelta::ToNanosecondsF |
( |
| ) |
const |
|
inlineconstexpr |
◆ ToSeconds()
constexpr int64_t fml::TimeDelta::ToSeconds |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 64 of file time_delta.h.
constexpr int64_t ToMilliseconds() const
◆ ToSecondsF()
constexpr double fml::TimeDelta::ToSecondsF |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 71 of file time_delta.h.
71 {
72 return delta_ / (1000.0 * 1000.0 * 1000.0);
73 }
◆ ToTimespec()
struct timespec fml::TimeDelta::ToTimespec |
( |
| ) |
|
|
inline |
Definition at line 110 of file time_delta.h.
110 {
111 struct timespec ts;
113 ts.tv_sec =
static_cast<time_t
>(
ToSeconds());
115 return ts;
116 }
constexpr int64_t ToSeconds() const
constexpr intptr_t kNanosecondsPerSecond
◆ Zero()
static constexpr TimeDelta fml::TimeDelta::Zero |
( |
| ) |
|
|
inlinestaticconstexpr |
The documentation for this class was generated from the following file: