25 #ifndef INCLUDED_TimeValueChrono_h_GUID_19CA90DA_70CF_4CBD_2327_5B6335744E91 26 #define INCLUDED_TimeValueChrono_h_GUID_19CA90DA_70CF_4CBD_2327_5B6335744E91 43 template <
typename Rep,
typename Period>
46 std::chrono::duration<Rep, Period>
const &additionalTime) {
48 using SecondsDuration = duration<OSVR_TimeValue_Seconds>;
49 using USecondsDuration = duration<OSVR_TimeValue_Microseconds, std::micro>;
51 auto seconds = duration_cast<SecondsDuration>(additionalTime);
52 ret.seconds += seconds.count();
54 duration_cast<USecondsDuration>(additionalTime - seconds).count();
59 #endif // INCLUDED_TimeValueChrono_h_GUID_19CA90DA_70CF_4CBD_2327_5B6335744E91 friend const ScalarAddReturnType operator+(const Scalar &scalar, const Cwise &mat)
Definition: Cwise.h:101
OSVR_UTIL_EXPORT void osvrTimeValueNormalize(OSVR_INOUT_PTR OSVR_TimeValue *tv) OSVR_FUNC_NONNULL((1))
"Normalizes" a time value so that the absolute number of microseconds is less than 1...
Definition: TimeValueC.cpp:46
Definition: TimeValueChrono.h:60
Header providing a C++ wrapper around TimeValueC.h.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
Definition: TimeValueC.h:81