home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / s / s001 / 1.ddi / TS / SRC / STOPWATC.C < prev    next >
Encoding:
Text File  |  1990-01-08  |  606 b   |  28 lines

  1.            /******************************************
  2.            *          STOPWATCH.c             *
  3.                * Copyright TimeSlice, Inc. 1985, 86, 87. *
  4.                ******************************************/
  5. long time( long * );
  6.  
  7. /***
  8. * TIMESTAMP( STMPPTR )
  9. * Set the long pointed by stmpptr to the current time, in seconds,
  10. * and return time.
  11. ***/
  12. long timestamp( stmpptr )
  13. long *stmpptr;
  14. {
  15.  
  16.   return time( stmpptr );
  17. }
  18.  
  19. /***
  20. * ELAPSED( STMPPTR )
  21. * Return number of seconds elapsed since timestamp( stmpptr ) was called.
  22. ***/
  23. long elapsed( stmpptr )
  24. long *stmpptr;
  25. {
  26.   return time( 0L ) - *stmpptr;
  27. }
  28.