1 #ifndef RADIX_TIME_DELTA_HPP
2 #define RADIX_TIME_DELTA_HPP
14 constexpr
TimeDelta(
double microsecs) : value(static_cast<
Type>(microsecs)) {}
15 constexpr
TimeDelta(
int microsecs) : value(static_cast<
Type>(microsecs)) {}
19 constexpr
operator uint32_t()
const {
return value; }
24 constexpr
Type sec()
const {
return value / 1000000; }
25 constexpr
double sec_d()
const {
return value / 1000000.; }
29 constexpr
Type msec()
const {
return value / 1000; }
30 constexpr
double msec_d()
const {
return value / 1000.; }
35 constexpr
double usec_d()
const {
return static_cast<double>(
value); }
constexpr TimeDelta(Type microsecs)
Definition: TimeDelta.hpp:13
static constexpr TimeDelta sec(double t)
Definition: TimeDelta.hpp:21
Definition: GameController.hpp:7
static constexpr TimeDelta usec(Type t)
Definition: TimeDelta.hpp:33
static constexpr TimeDelta msec(Type t)
Definition: TimeDelta.hpp:28
constexpr Type msec() const
Definition: TimeDelta.hpp:29
uint32_t Type
Definition: TimeDelta.hpp:10
static constexpr TimeDelta sec(int t)
Definition: TimeDelta.hpp:22
static constexpr TimeDelta usec(double t)
Definition: TimeDelta.hpp:31
static constexpr TimeDelta sec(Type t)
Definition: TimeDelta.hpp:23
constexpr double usec_d() const
Definition: TimeDelta.hpp:35
Definition: TimeDelta.hpp:8
static constexpr TimeDelta usec(int t)
Definition: TimeDelta.hpp:32
constexpr TimeDelta(int microsecs)
Definition: TimeDelta.hpp:15
constexpr double sec_d() const
Definition: TimeDelta.hpp:25
constexpr Type usec() const
Definition: TimeDelta.hpp:34
Type value
Definition: TimeDelta.hpp:11
static constexpr TimeDelta msec(double t)
Definition: TimeDelta.hpp:26
static constexpr TimeDelta msec(int t)
Definition: TimeDelta.hpp:27
constexpr TimeDelta(double microsecs)
Definition: TimeDelta.hpp:14
constexpr double msec_d() const
Definition: TimeDelta.hpp:30
constexpr TimeDelta()
Definition: TimeDelta.hpp:18
constexpr Type sec() const
Definition: TimeDelta.hpp:24