Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)

difftime(3) Guardian Native C Library Calls Reference Manual
NAME
difftime - Computes the difference between two calendar times
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <time.h>
double difftime(
time_t time1,
time_t time2
);
PARAMETERS
time1 Species a time value expressed in seconds.
time2 Species a time value expressed in seconds.
DESCRIPTION
The difftime() function computes the difference between two calendar times.
NOTES
This function supports both IEEE Std 754-1985 oating-point and Tandem oating-point values
in the native environment. IEEE values can include NaN and innity, and the sign of 0.0 (zero)
can be either positive or negative. Refer to the fp_class(3) reference page for a description of
IEEE value classes.
Guardian functions are available to convert between oating-point formats. Refer to the Guar-
dian Programmers Guide for a discussion of oating-point conversions.
RETURN VALUES
Upon successful completion, the difftime( ) function returns a value, expressed in seconds, that is
the difference between the values of parameters time1 and time2.
On error, this function returns a null pointer.
ERRORS
No error values are returned. This function does not set errno.
RELATED INFORMATION
Functions: asctime(3), ctime(3), fp_class(3), getenv(3), gmtime(3), isnan(3), localtime(3),
mktime(3), strftime(3), time(3), tzset(3), utime(3).
STANDARDS CONFORMANCE
This function conforms to the XPG4 Version 2 specication when used for IEEE oating-point
format data.
146 Hewlett-Packard Company 527192-005