OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
TimeValueC.cpp File Reference

Implementation. More...

#include <osvr/Util/TimeValueC.h>
#include <vrpn_Shared.h>
#include <ratio>

Go to the source code of this file.

Macros

#define OSVR_USEC_PER_SEC   std::micro::den;
 

Functions

void osvrTimeValueNormalize (OSVR_TimeValue *tv)
 "Normalizes" a time value so that the absolute number of microseconds is less than 1,000,000, and that the sign of both components is the same. More...
 
void osvrTimeValueSum (OSVR_TimeValue *tvA, const OSVR_TimeValue *tvB)
 Sums two time values, replacing the first with the result. More...
 
void osvrTimeValueDifference (OSVR_TimeValue *tvA, const OSVR_TimeValue *tvB)
 Computes the difference between two time values, replacing the first with the result. More...
 
template<typename T >
int numcmp (T a, T b)
 
int osvrTimeValueCmp (const OSVR_TimeValue *tvA, const OSVR_TimeValue *tvB)
 Compares two time values (assumed to be normalized), returning the same values as strcmp. More...
 
void osvrTimeValueGetNow (OSVR_TimeValue *dest)
 Gets the current time in the TimeValue. Parallel to gettimeofday.
 
void osvrTimeValueToStructTimeval (timeval *dest, const OSVR_TimeValue *src)
 Converts from a TimeValue struct to your system's struct timeval. More...
 
void osvrStructTimevalToTimeValue (OSVR_TimeValue *dest, const timeval *src)
 

Detailed Description

Implementation.

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

Definition in file TimeValueC.cpp.