delorie.com/djgpp/doc/libc/libc_131.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

difftime

Syntax

 
#include <time.h>

double difftime(time_t t1, time_t t0);

Description

This function returns the difference in time, in seconds, from t0 to t1.

Return Value

The number of seconds.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
time_t t1, t0;
double elapsed;
time(&t0);
do_something();
time(&t1);
elapsed = difftime(t1, t0);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004