| 23 | } |
| 24 | |
| 25 | double getDuration() const { |
| 26 | if (finished) { |
| 27 | auto duration = stopTime - startTime; |
| 28 | return (double)std::chrono::duration_cast<std::chrono::microseconds>(duration).count(); |
| 29 | } |
| 30 | throw Exception("Timer is still running."); |
| 31 | } |
| 32 | |
| 33 | uint64_t getElapsedTimeInMS() const { |
| 34 | auto now = std::chrono::high_resolution_clock::now(); |