home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Database / CLIPR502.DOS / SOURCE / SAMPLE / ELAPTIME.PRG < prev    next >
Encoding:
Text File  |  1993-02-15  |  668 b   |  28 lines

  1. /***
  2. *
  3. *  Elaptime.prg
  4. *
  5. *  Summer '87 ELAPTIME() Compatibility Routine
  6. *
  7. *  Copyright (c) 1993, Computer Associates International Inc.
  8. *  All rights reserved.
  9. *
  10. */
  11.  
  12.  
  13. /***
  14. *
  15. *  ElapTime( <nStartTime>, <nEndTime> )
  16. *
  17. *    Return a time string showing the difference between start and end times
  18. *
  19. *    Note: If start time is greater than end time, this algorithm assumes
  20. *         that the day changed at midnight.  Only for timings under 24 hours.
  21. *         86400 is the number of seconds in 24 hours.
  22. */
  23. FUNCTION ELAPTIME(cl_start, cl_end)
  24.     RETURN TSTRING( IF( cl_end < cl_start, 86400, 0) + ;
  25.                    SECS(cl_end) - SECS(cl_start) )
  26.  
  27.  
  28.