Lines Matching refs:base
80 if (((tsp->base.ref == 0) && (inst->ref > 0)) in timeutil_sync_state_update()
81 || ((inst->ref > tsp->base.ref) in timeutil_sync_state_update()
82 && (inst->local > tsp->base.local))) { in timeutil_sync_state_update()
83 if (tsp->base.ref == 0) { in timeutil_sync_state_update()
84 tsp->base = *inst; in timeutil_sync_state_update()
98 const struct timeutil_sync_instant *base) in timeutil_sync_state_set_skew() argument
104 if (base != NULL) { in timeutil_sync_state_set_skew()
105 tsp->base = *base; in timeutil_sync_state_set_skew()
118 if ((tsp->base.ref != 0) && (tsp->latest.ref != 0) in timeutil_sync_estimate_skew()
119 && (tsp->latest.local > tsp->base.local)) { in timeutil_sync_estimate_skew()
121 double ref_delta = tsp->latest.ref - tsp->base.ref; in timeutil_sync_estimate_skew()
122 double local_delta = tsp->latest.local - tsp->base.local; in timeutil_sync_estimate_skew()
135 if ((tsp->skew > 0) && (tsp->base.ref > 0) && (refp != NULL)) { in timeutil_sync_ref_from_local()
137 int64_t local_delta = local - tsp->base.local; in timeutil_sync_ref_from_local()
145 int64_t ref_abs = (int64_t)tsp->base.ref + ref_delta; in timeutil_sync_ref_from_local()
163 if ((tsp->skew > 0) && (tsp->base.ref > 0) && (localp != NULL)) { in timeutil_sync_local_from_ref()
165 int64_t ref_delta = (int64_t)(ref - tsp->base.ref); in timeutil_sync_local_from_ref()
174 int64_t local_abs = (int64_t)tsp->base.local in timeutil_sync_local_from_ref()