Monado OpenXR Runtime
|
Implementation of a steady, convertible clock. More...
#include "u_time.h"
#include "xrt/xrt_config_os.h"
#include "xrt/xrt_compiler.h"
#include <chrono>
#include <new>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
Data Structures | |
struct | MatchingTimePoints |
struct | time_state |
Time-keeping state structure. More... | |
Functions | |
struct time_state * | time_state_create () |
void | time_state_destroy (struct time_state **state_ptr) |
timepoint_ns | time_state_get_now (struct time_state const *state) |
timepoint_ns | time_state_get_now_and_update (struct time_state *state) |
void | time_state_to_timespec (struct time_state const *state, timepoint_ns timestamp, struct timespec *out) |
timepoint_ns | time_state_from_timespec (struct time_state const *state, const struct timespec *timespecTime) |
timepoint_ns | time_state_from_monotonic_ns (struct time_state const *state, uint64_t monotonic_ns) |
Implementation of a steady, convertible clock.
struct time_state* time_state_create | ( | ) |
void time_state_destroy | ( | struct time_state ** | state_ptr | ) |
timepoint_ns time_state_from_monotonic_ns | ( | struct time_state const * | state, |
uint64_t | monotonic_ns | ||
) |
References time_state::lastTime, and time_state::lastTimePoints.
timepoint_ns time_state_from_timespec | ( | struct time_state const * | state, |
const struct timespec * | timespecTime | ||
) |
References duration, time_state::lastTime, time_state::lastTimePoints, and MatchingTimePoints::sys.
timepoint_ns time_state_get_now | ( | struct time_state const * | state | ) |
timepoint_ns time_state_get_now_and_update | ( | struct time_state * | state | ) |
References time_state::lastTime, time_state::lastTimePoints, and timestamp.
void time_state_to_timespec | ( | struct time_state const * | state, |
timepoint_ns | timestamp, | ||
struct timespec * | out | ||
) |
References time_state::lastTime, time_state::lastTimePoints, and MatchingTimePoints::sys.