Monado OpenXR Runtime
Public Member Functions | Data Fields
time_state Struct Reference

Time-keeping state structure. More...

#include <util/u_time.h>

Collaboration diagram for time_state:
Collaboration graph
[legend]

Public Member Functions

struct time_statetime_state_create ()
 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_from_monotonic_ns (struct time_state const *state, uint64_t monotonic_ns)
 Convert a monotonic system time (such as from Portable Timekeeping) to an adjusted integer timestamp. More...
 

Data Fields

MatchingTimePoints lastTimePoints = {}
 
timepoint_ns lastTime = {}
 

Detailed Description

Time-keeping state structure.

Exposed as an opaque pointer.

See also
timepoint_ns

Field Documentation

◆ lastTime

timepoint_ns time_state::lastTime = {}

◆ lastTimePoints

MatchingTimePoints time_state::lastTimePoints = {}

The documentation for this struct was generated from the following files: