home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / pc_hw / timer / clock.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  502 b   |  26 lines

  1. @node clock, time
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <time.h>
  6.  
  7. clock_t clock(void);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function returns the number of clock ticks since an arbitrary time,
  13. actually, since the first call to @code{clock}, which itself returns
  14. zero.  The number of tics per second is CLOCKS_PER_SEC.
  15.  
  16. @subheading Return Value
  17.  
  18. The number of tics.
  19.  
  20. @subheading Example
  21.  
  22. @example
  23. printf("%d seconds have elapsed\n", clock()/CLOCKS_PER_SEC);
  24. @end example
  25.  
  26.