26#ifndef SOPC_TIME_REFERENCE_H_
27#define SOPC_TIME_REFERENCE_H_
41#ifndef SOPC_MONOTONIC_CLOCK
42#define SOPC_MONOTONIC_CLOCK true
131 uint64_t duration_us,
void SOPC_HighRes_TimeReference_SleepUntil(const SOPC_HighRes_TimeReference *date)
Precise sleep until specified date.
int64_t SOPC_HighRes_TimeReference_DeltaUs(const SOPC_HighRes_TimeReference *tRef, const SOPC_HighRes_TimeReference *t)
Compare two SOPC_HighRes_TimeReference elements into microseconds.
void SOPC_HighRes_TimeReference_Delete(SOPC_HighRes_TimeReference **t)
Deletes a time reference.
SOPC_HighRes_TimeReference * SOPC_HighRes_TimeReference_Create(void)
Create a new time reference.
SOPC_TimeReference SOPC_TimeReference_GetCurrent(void)
return the current time reference
bool SOPC_HighRes_TimeReference_IsExpired(const SOPC_HighRes_TimeReference *t, const SOPC_HighRes_TimeReference *now)
Checks is a date is in the future (relatively to another date)
void SOPC_HighRes_TimeReference_AddSynchedDuration(SOPC_HighRes_TimeReference *t, uint64_t duration_us, int32_t offset_us)
Adds an offset to a SOPC_HighRes_TimeReference object, ensuring a specific time offset towards a sync...
SOPC_TimeReference SOPC_TimeReference_AddMilliseconds(SOPC_TimeReference timeRef, uint64_t ms)
return the time reference corresponding to the given time reference incremented by the given duration...
struct SOPC_HighRes_TimeReference SOPC_HighRes_TimeReference
Definition sopc_time_reference.h:59
int8_t SOPC_TimeReference_Compare(SOPC_TimeReference left, SOPC_TimeReference right)
return the comparison of given time references
void SOPC_HighRes_TimeReference_GetTime(SOPC_HighRes_TimeReference *t)
Store the current time in t.
uint64_t SOPC_TimeReference
Definition sopc_time_reference.h:52
void SOPC_HighRes_TimeReference_Copy(SOPC_HighRes_TimeReference *to, const SOPC_HighRes_TimeReference *from)
A copy of a non-NULL SOPC_HighRes_TimeReference structure.