Converts a timespec structure expressing a relative time to a binary timestamp. Format #include <utc.h> int utc_mkbinreltime(*utc, *timesp, *inaccsp) utc_t *utc; const reltimespec_t *timesp; const timespec_t *inaccsp;
1 – Parameters
Input timesp A reltimespec structure that expresses a relative time. inaccsp A timespec structure that expresses inaccuracy. If tv_sec is set to a value of -1, the inaccuracy is considered to be infinite. Output utc Resulting relative binary timestamp.
2 – Description
The Make Binary Relative Time routine converts a timespec structure that expresses relative time to a binary timestamp.
3 – Returns
0 Indicates that the routine executed successfully. -1 Indicates an invalid time argument or invalid results.
4 – Example
See the sample program for the utc_addtime routine.
5 – Related Functions
utc_binreltime, utc_mkbintime