19 t0 = std::chrono::steady_clock::now();
26 t1 = std::chrono::steady_clock::now();
33 return (std::chrono::duration<double>(t1 - t0)).count();
38 std::chrono::time_point<std::chrono::steady_clock> t0;
39 std::chrono::time_point<std::chrono::steady_clock> t1;
45 #endif //CMU462_TIMER_H
double duration()
Return duration between the last call to start and last call to stop.
Definition: timer.h:32
void stop()
Stops the timer.
Definition: timer.h:25
void start()
Starts the timer.
Definition: timer.h:18
A basic timer class.
Definition: timer.h:12