17 startTime = std::chrono::high_resolution_clock::now();
21 stopTime = std::chrono::high_resolution_clock::now();
27 auto duration = stopTime - startTime;
28 return (
double)std::chrono::duration_cast<std::chrono::microseconds>(duration).count();
30 throw Exception(
"Timer is still running.");
34 auto now = std::chrono::high_resolution_clock::now();
35 auto duration = now - startTime;
36 auto count = std::chrono::duration_cast<std::chrono::milliseconds>(duration).count();
42 std::chrono::time_point<std::chrono::high_resolution_clock> startTime;
43 std::chrono::time_point<std::chrono::high_resolution_clock> stopTime;
44 bool finished =
false;
#define KU_ASSERT(condition)
Definition assert.h:19
Definition exception.h:11
void start()
Definition timer.h:15
uint64_t getElapsedTimeInMS() const
Definition timer.h:33
double getDuration() const
Definition timer.h:25
void stop()
Definition timer.h:20
Definition alter_type.h:5