Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: July 2017
 
 

difftime(3C)

Name

difftime - computes the difference between two calendar times

Synopsis

#include <time.h>

double difftime(time_t time1, time_t time0);

Description

The difftime() function computes the difference between two calendar times.

Return Values

The difftime() functions returns the difference (time1-time0) expressed in seconds as a double.

Usage

The difftime() function is provided because there are no general arithmetic properties defined for type time_t.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
MT-Safe
Standard

See Also

ctime(3C), attributes(5), standards(5)