Question: // Timer.h #ifndef TIMER_H #define TIMER_H #include #include #include using namespace std; class Timer { public: Timer(); void start() throw (runtime_error); void stop() throw (logic_error);
// Timer.h
#ifndef TIMER_H
#define TIMER_H
#include
#include
#include
using namespace std;
class Timer {
public:
Timer();
void start() throw (runtime_error);
void stop() throw (logic_error);
double getElapsedTime() const throw (logic_error);
private:
clock_t beginTime;
clock_t duration;
bool timerWasStarted;
};
#endif // ifndef TIMER_H
I have this header file. Could you help me implement all the function?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
