difftime

Calculates the difference between two calendar times.

Library:LibC
Classification:ANSI
Service:Time

Syntax

  #include <time.h> 
   
  double difftime (
     time_t   t1,   
     time_t   t2);
  

Parameters

t1

(IN) Specifies the ending calendar time.

t2

(IN) Specifies the beginning calendar time.

Return Values

Returns the difference between the two times in seconds.

Remarks

The difference is computing by subtracting t2 from t1.

See Also