OSVR-Core
Classes | Namespaces | Typedefs | Functions
TimeValueChrono.h File Reference

Header. More...

#include <osvr/Util/TimeValue.h>
#include <chrono>
#include <cstdint>

Go to the source code of this file.

Classes

class  osvr::util::time::TimeValueClock
 
class  osvr::util::time::detail::TimeValueChronoWrapperBase< Derived >
 CRTP base class for things that wrap a OSVR_TimeValue for the purposes of some interop with std::chrono. More...
 
class  osvr::util::time::TimeValueChronoValueWrapper
 Copy and store a TimeValue in a wrapper for std::chrono interop. More...
 
class  osvr::util::time::TimeValueChronoConstRefWrapper
 Store a reference to const to a TimeValue for std::chrono interop. More...
 

Namespaces

 osvr
 The main namespace for all C++ elements of the framework, internal and external.
 
 osvr::util
 The Util library: Functionality not necessarily coupled to any particular core library, serving more as a common base layer behind all systems.
 
 osvr::util::time
 Functionality related to time and the OSVR_TimeValue abstraction.
 

Typedefs

using osvr::util::time::time_value_period = std::micro
 Assumes the max representable resolution otherwise.
 
using osvr::util::time::time_value_scalar_rep = std::uint64_t
 
using osvr::util::time::time_value_scalar_duration = std::chrono::duration< time_value_scalar_rep, time_value_period >
 
using osvr::util::time::time_value_seconds_duration = std::chrono::duration< OSVR_TimeValue_Seconds >
 Duration representation of the first element in the structure.
 
using osvr::util::time::time_value_microseconds_duration = std::chrono::duration< OSVR_TimeValue_Microseconds, std::micro >
 Duration representation of the second element of the structure.
 

Functions

osvr::util::time::TimeValue osvr::util::time::getTimeValue (TimeValueClock::time_point const &tp)
 Get the TimeValue inside of a TimeValueClock time_point.
 
TimeValueChronoConstRefWrapper osvr::util::time::detail::wrap_time_value (util::time::TimeValue const &tv)
 
TimeValueChronoConstRefWrapper osvr::util::time::detail::wrap_time_value (TimeValueClock::time_point const &tp)
 
template<typename DerivedA , typename DerivedB >
time_value_scalar_duration osvr::util::time::operator- (detail::TimeValueChronoWrapperBase< DerivedA > const &a, detail::TimeValueChronoWrapperBase< DerivedB > const &b)
 Subtract one wrapped TimeValue from another and get a std::duration back! More...
 
template<typename Derived >
time_value_scalar_duration osvr::util::time::operator- (detail::TimeValueChronoWrapperBase< Derived > const &a, util::time::TimeValue const &b)
 subtraction: wrapped value and timevalue
 
template<typename Derived >
time_value_scalar_duration osvr::util::time::operator- (util::time::TimeValue const &a, detail::TimeValueChronoWrapperBase< Derived > const &b)
 subtraction: timevalue and wrapped value
 
time_value_scalar_duration osvr::util::time::operator- (TimeValueClock::time_point const &a, TimeValueClock::time_point const &b)
 Overloaded subtraction operator that returns a simple scalar duration. More...
 
template<typename Derived >
time_value_scalar_duration osvr::util::time::operator- (TimeValueClock::time_point const &a, detail::TimeValueChronoWrapperBase< Derived > const &b)
 subtraction: time-point and wrapped value
 
template<typename Derived >
time_value_scalar_duration osvr::util::time::operator- (detail::TimeValueChronoWrapperBase< Derived > const &a, TimeValueClock::time_point const &b)
 subtraction: wrapped value and time-point
 
time_value_scalar_duration osvr::util::time::operator- (TimeValueClock::time_point const &a, util::time::TimeValue const &b)
 subtraction: time-point and timevalue
 
template<typename Derived >
time_value_scalar_duration osvr::util::time::operator- (util::time::TimeValue const &a, TimeValueClock::time_point const &b)
 subtraction: timevalue and time-point
 
TimeValueClock::time_point osvr::util::time::as_time_point (time::TimeValue const &tv)
 Treat/convert a TimeValue into a time point.
 
TimeValueClock::scalar_duration osvr::util::time::to_duration (time::TimeValue const &tv)
 Convert a TimeValue into a scalar duration.
 

Detailed Description

Header.

Date
2016
Author
Sensics, Inc. http://sensics.com/osvr