Index Click this button to go to the index for this section.


difftime(3)

NAME

difftime - Compares time values

LIBRARY

Standard C Library (libc.so, libc.a)

SYNOPSIS

#include <time.h> double difftime( time_t time1, time_t time2);

STANDARDS

Interfaces documented on this reference page conform to industry standards as follows: difftime(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags.

PARAMETERS

time1 Specifies a time value expressed in seconds. time2 Specifies a time value expressed in seconds.

DESCRIPTION

The difftime() function returns a signed time value in seconds that is the difference between the values of the time1 and time2 parameters, also expressed in seconds.

NOTES

The difftime() function is supported for multithreaded applications.

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.

RELATED INFORMATION

Functions: ctime(3), time(3), timezone(3) Standards: standards(5)