Interface to CPU Timing Package

Go to Single-User Computer Implementation
Go to UNIX Implementation

PACKAGE CPUClock IS
------------------------------------------------------------------
--|
--| Specification for a package to do CPU timing of algorithms
--|
--| Author: Michael B. Feldman, The George Washington University
--| Last Modified: October 1995
--|
------------------------------------------------------------------

  SUBTYPE CPUSecond IS Float RANGE 0.0 .. Float'Last;
  -- We make CPUSecond a Float type so the usual operations are available

  PROCEDURE ResetCPUTime;
  -- Pre:  none
  -- Post: resets a CPU timer

  FUNCTION CPUTime RETURN CPUSecond;
  -- Pre:  none
  -- Post: returns the number of CPUSeconds since the last reset

END CPUClock;