Functionality related to time and the OSVR_TimeValue abstraction.Note that this is for C API-bordering areas. For purely C++ code, please use std::chrono for your time needs. More...
Typedefs | |
typedef ::OSVR_TimeValue | TimeValue |
C++-friendly typedef for the OSVR_TimeValue structure. | |
Functions | |
OSVR_ReturnCode | microsleep (uint64_t microseconds) |
Request a thread sleep for at least the given number of microseconds. More... | |
void | getNow (TimeValue &tv) |
Set the given TimeValue to the current time. | |
TimeValue | getNow () |
Get a TimeValue for the current time. | |
double | duration (TimeValue const &a, TimeValue const &b) |
Get a double containing seconds between the time points. More... | |
std::string | toDecimalString (TimeValue tv) |
Converts to a precise decimal string. | |
void | toStructTimeval (struct timeval &dest, TimeValue const &src) |
Convert a TimeValue to a struct timeval. | |
void | fromStructTimeval (TimeValue &dest, struct timeval const &src) |
Convert a struct timeval to a TimeValue. | |
TimeValue | toTimeValue (struct timeval const &src) |
Convert a struct timeval to a TimeValue. | |
TimeValue | fromStructTimeval (struct timeval const &src) |
Convert a struct timeval to a TimeValue. | |
Functionality related to time and the OSVR_TimeValue abstraction.
Note that this is for C API-bordering areas. For purely C++ code, please use std::chrono for your time needs.
|
inline |
Request a thread sleep for at least the given number of microseconds.
DO NOT use within a Sync plugin!
This is just a request for a minimum sleep time – operating system scheduling and sleep granularity means that you may end up sleeping for longer.
Definition at line 56 of file Microsleep.h.
|
inline |
Get a double containing seconds between the time points.
Definition at line 62 of file TimeValue.h.