Monado OpenXR Runtime
|
Time-keeping state structure. More...
#include <util/u_time.h>
Public Member Functions | |
struct time_state * | time_state_create (int64_t offset) |
Create a struct time_state. More... | |
void | time_state_destroy (struct time_state **state) |
Destroy a struct time_state. More... | |
timepoint_ns | time_state_get_now (struct time_state const *state) |
Get the current time as an integer timestamp. More... | |
timepoint_ns | time_state_get_now_and_update (struct time_state *state) |
Get the current time as an integer timestamp and update internal state. More... | |
void | time_state_to_timespec (struct time_state const *state, timepoint_ns timestamp, struct timespec *out) |
Convert an integer timestamp to a struct timespec (system time). More... | |
timepoint_ns | time_state_from_timespec (struct time_state const *state, const struct timespec *timespecTime) |
Convert a struct timespec (system time) to an integer timestamp. More... | |
timepoint_ns | time_state_monotonic_to_ts_ns (struct time_state const *state, int64_t monotonic_ns) |
Convert a monotonic system time (such as from Portable Timekeeping) to an adjusted integer timestamp. More... | |
int64_t | time_state_ts_to_monotonic_ns (struct time_state const *state, timepoint_ns timestamp) |
Convert a adjusted integer timestamp to an monotonic system time (such as from Portable Timekeeping). More... | |
void | time_state_to_win32perfcounter (struct time_state const *state, timepoint_ns timestamp, LARGE_INTEGER *out_qpc_ticks) |
Converts a timestamp to Win32 "QPC" ticks. More... | |
timepoint_ns | time_state_from_win32perfcounter (struct time_state const *state, const LARGE_INTEGER *qpc_ticks) |
Converts from Win32 "QPC" ticks to timestamp. More... | |
Data Fields | |
timepoint_ns | offset |