Go to the documentation of this file.
25 #ifndef RIOT_CHRONO_HPP
26 #define RIOT_CHRONO_HPP
37 constexpr uint32_t microsecs_in_sec = 1000000;
73 template <
class Rep,
class Period>
75 auto s = std::chrono::duration_cast<std::chrono::seconds>(d);
76 auto m = (std::chrono::duration_cast<std::chrono::microseconds>(d) - s);
95 void inline adjust_overhead() {
145 #endif // RIOT_CHRONO_HPP
void xtimer_now_timex(timex_t *out)
get the current system time into a timex_t
native_handle_type native_handle() const
Gives access to the native handle that stores the time information.
bool operator>=(const time_point &lhs, const time_point &rhs)
Compare two timepoints.
time_point & operator+=(const std::chrono::duration< Rep, Period > &d)
Add a standard chrono::duration to this time point.
bool operator>(const time_point &lhs, const time_point &rhs)
Compares two timepoints.
bool operator<=(const time_point &lhs, const time_point &rhs)
Compares two timepoints.
time_point now()
Returns the current time saved in a time point.
A time point for timed wait, as clocks from the standard are not available on RIOT.
uint32_t microseconds
number of microseconds
uint32_t seconds
number of seconds
bool operator<(const time_point &lhs, const time_point &rhs)
Compares two timepoints.
time_point(timex_t &&tp)
Create time point from timex_t struct.
uint32_t seconds() const
Returns seconds member as uint32_t.
uint32_t microseconds() const
Returns microseconds member as uint32_t.
time_point()
Creates a time point with seconds and microseconds set to 0.
xtimer interface definitions