Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Functions
Time.hpp File Reference
#include <toolbox/util/TypeTraits.hpp>
#include <boost/io/ios_state.hpp>
#include <chrono>
#include <iomanip>
#include <optional>
Include dependency graph for Time.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  toolbox::sys::MonoClock
 
struct  toolbox::sys::WallClock
 
class  toolbox::sys::CyclTime
 
struct  toolbox::sys::PutTime< DurationT >
 
struct  toolbox::util::TypeTraits< std::chrono::duration< RepT, PeriodT > >
 
struct  toolbox::util::TypeTraits< WallTime >
 

Namespaces

namespace  toolbox
 
namespace  toolbox::sys
 
namespace  toolbox::util
 

Typedefs

using toolbox::sys::Seconds = std::chrono::seconds
 
using toolbox::sys::Decis = std::chrono::duration< int64_t, std::deci >
 
using toolbox::sys::Millis = std::chrono::milliseconds
 
using toolbox::sys::Micros = std::chrono::microseconds
 
using toolbox::sys::Nanos = std::chrono::nanoseconds
 
using toolbox::sys::NanoTime = Nanos
 
using toolbox::sys::Duration = Nanos
 
using toolbox::sys::MonoTime = MonoClock::time_point
 
using toolbox::sys::WallTime = WallClock::time_point
 

Functions

TOOLBOX_WEAK Nanos toolbox::sys::get_time (clockid_t clock_id) noexcept
 
ostream & toolbox::sys::operator<< (ostream &os, MonoTime t)
 
ostream & toolbox::sys::operator<< (ostream &os, WallTime t)
 
template<typename RepT , typename PeriodT >
constexpr bool toolbox::sys::is_zero (std::chrono::duration< RepT, PeriodT > d) noexcept
 
template<typename ClockT >
constexpr bool toolbox::sys::is_zero (std::chrono::time_point< ClockT, Duration > t) noexcept
 
template<typename ClockT , typename DurationT >
constexpr DurationT toolbox::sys::time_since_epoch (std::chrono::time_point< ClockT, Duration > t) noexcept
 
template<typename ClockT >
constexpr std::int64_t toolbox::sys::ms_since_epoch (std::chrono::time_point< ClockT, Duration > t) noexcept
 
template<typename ClockT >
constexpr std::int64_t toolbox::sys::us_since_epoch (std::chrono::time_point< ClockT, Duration > t) noexcept
 
template<typename ClockT >
constexpr std::int64_t toolbox::sys::ns_since_epoch (std::chrono::time_point< ClockT, Duration > t) noexcept
 
template<typename ClockT , typename RepT , typename PeriodT >
constexpr auto toolbox::sys::to_time (std::chrono::duration< RepT, PeriodT > d) noexcept
 
template<typename ClockT >
constexpr auto toolbox::sys::to_time (timeval tv) noexcept
 
template<typename ClockT >
constexpr auto toolbox::sys::to_time (timespec ts) noexcept
 
template<typename RepT , typename PeriodT >
constexpr timeval toolbox::sys::to_timeval (std::chrono::duration< RepT, PeriodT > d) noexcept
 
template<typename ClockT >
constexpr timeval toolbox::sys::to_timeval (std::chrono::time_point< ClockT, Duration > t) noexcept
 
template<typename RepT , typename PeriodT >
constexpr timespec toolbox::sys::to_timespec (std::chrono::duration< RepT, PeriodT > d) noexcept
 
template<typename ClockT >
constexpr timespec toolbox::sys::to_timespec (std::chrono::time_point< ClockT, Duration > t) noexcept
 
template<typename DurationT = Seconds>
auto toolbox::sys::put_time (WallTime t, const char *fmt) noexcept
 
template<typename DurationT >
std::ostream & toolbox::sys::operator<< (std::ostream &os, PutTime< DurationT > pt)
 
constexpr bool toolbox::sys::is_zero (timeval tv) noexcept
 
void toolbox::sys::clear (timeval &tv) noexcept
 
timeval toolbox::sys::operator+ (timeval lhs, timeval rhs) noexcept
 
timeval toolbox::sys::operator- (timeval lhs, timeval rhs) noexcept
 
constexpr bool toolbox::sys::is_zero (timespec ts) noexcept
 
void toolbox::sys::clear (timespec &ts) noexcept
 
timespec toolbox::sys::operator+ (timespec lhs, timespec rhs) noexcept
 
timespec toolbox::sys::operator- (timespec lhs, timespec rhs) noexcept
 
constexpr auto toolbox::sys::parse_nanos (std::string_view sv) noexcept
 
constexpr std::optional< Nanostoolbox::sys::parse_time_only (std::string_view sv) noexcept