// This class provides a device to measure the cpu-time. // Times are reported in seconds. // E. Mayoraz, August 95 #ifndef chrono_h #define chrono_h #include class chrono { public: chrono(); // creates and initializes a chrono double time() const; // gives the time since the creation or the last restart double lap(); // gives the time since the creation, the last restart or the last lap friend ostream& operator << (ostream& s, const chrono& c); // send one line on stream s with lap time and total time void restart(); // restart the chrono private: double starttime, laptime; }; #endif