utc_subtime(3dts)
Computes the difference between two binary timestamps
Synopsis
#include <dce/utc.h> int utc_subtime( utc_t *result, utc_t *utc1,
utc_t *utc2);
Parameters
Input
utc1 Binary timestamp or relative binary timestamp. Use NULL if you want this routine to use the current time for this parameter.
utc2 Binary timestamp or relative binary timestamp. Use NULL if you want this routine to use the current time for this parameter.
Output
result Resulting binary timestamp or relative binary timestamp, depending upon the operation performed:
· absolute time absolute time=relative time
· relative time relative time=relative time
· absolute time relative time=absolute time
· relative time absolute time is undefined.
Notes Although no error is returned, the combination relative time absolute time should not be used.
Description The utc_subtime( ) routine subtracts one binary timestamp from another. The two binary timestamps express either an absolute time and a relative time, two
relative times, or two absolute times. The resulting timestamp is utc1 minus utc2. The inaccuracies of the two input timestamps are combined and included in the output timestamp.
The TDF in the first timestamp is copied to the output.
Return Values ~0 Indicates that the routine executed successfully.
1 Indicates an invalid time argument or invalid results.
Examples See the sample program in the utc_binreltime(3dts) reference page.
Related Information Function: utc_addtime(3dts)
|