Provide a SOPC_RealTime type for all platforms
Description
Duration in OPC UA is a double describing durations in milliseconds and fractions of it.
The SOPC_RealTime
type has been introduced to support publication durations smaller than 1ms.
Analysis
For now, SOPC_RealTime
uses a typedef struct timespec SOPC_RealTime;
for its definition and this forces this definition to be linux only.
The goal is generalize this interface on all platforms while avoiding unnecessary indirections.
A solution to test is to have typedef struct SOPC_RealTime SOPC_RealTime;
in helpers_platform_dep/sopc_time.h
and struct SOPC_RealTime { timespec t; }
in linux/p_time.c
.
Then casting SOPC_RealTime *
to timespec *
should be legit.