Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (a - d) difftime(3)
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 and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <time.h>
double difftime(
time_t time1,
time_t time2
);
PARAMETERS
time1 Specifies a time value expressed in seconds.
time2 Specifies 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 floating-point and Tandem floating-point values
in the native environment. IEEE values can include NaN and infinity, 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 floating-point formats. Refer to the Guar-
dian Programmer’s Guide for a discussion of floating-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 specification when used for IEEE floating-point
format data.
527187-017 Hewlett-Packard Company 1−187