Monado OpenXR Runtime
|
Helpers to estimate offsets between clocks. More...
#include "util/u_time.h"
Go to the source code of this file.
Functions | |
static timepoint_ns | m_clock_offset_a2b (float freq, timepoint_ns a, timepoint_ns b, time_duration_ns *inout_a2b) |
Helper to estimate the offset between two clocks using exponential smoothing. More... | |
Helpers to estimate offsets between clocks.
|
inlinestatic |
Helper to estimate the offset between two clocks using exponential smoothing.
Given a sample from two timestamp domains A and B that should have been sampled as close as possible, together with an estimate of the offset between A clock and B clock (or zero), it applies a smoothing average on the estimated offset and returns a
in B clock.
freq | About how many times per second this function is called. Helps setting a good decay value. | |
a | Timestamp in clock A of the event | |
b | Timestamp in clock B of the event | |
[in,out] | inout_a2b | Pointer to the current offset estimate from A to B, or 0 if unknown. Value pointed-to will be updated. |
a
in B clock Referenced by receive_imu_sample().