home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / ansi / time / difftime.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  454 b   |  30 lines

  1. @node difftime, time
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <time.h>
  6.  
  7. double difftime(time_t t1, time_t t0);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function returns the difference in time, in seconds, from @var{t0}
  13. to @var{t1}. 
  14.  
  15. @subheading Return Value
  16.  
  17. The number of seconds.
  18.  
  19. @subheading Example
  20.  
  21. @example
  22. time_t t1, t0;
  23. double elapsed;
  24. time(&t0);
  25. do_something();
  26. time(&t1);
  27. elapsed = difftime(t1, t0);
  28. @end example
  29.  
  30.