VMS Help
DECdts, utc_subtime
*Conan The Librarian
|
Computes the difference between two binary timestamps that
express either an absolute time and a relative time, two relative
times, or two absolute times.
Format
#include <utc.h>
int utc_subtime(*result, *utc1, *utc2)
utc_t *result;
const utc_t *utc1;
const utc_t *utc2;
Input
utc1
Binary timestamp or relative binary timestamp.
utc2
Binary timestamp or relative binary timestamp.
Output
result
Resulting binary timestamp or relative binary timestamp,
depending on the operation performed:
o absolute time - absolute time = relative time
o relative time - relative time = relative time
o absolute time - relative time = absolute time
o relative time - absolute time is undefined. See NOTES.
The Subtract Time routine subtracts one binary timestamp
from another. 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.
Although no error is returned, do not use the combination
relative time - absolute time.
0 Indicates that the routine executed successfully.
-1 Indicates an invalid time argument or invalid results.
See the sample program for the utc_binreltime routine.
utc_addtime