| 18 | } |
| 19 | |
| 20 | void TimeMetric::stop() { |
| 21 | if (!enabled) { |
| 22 | return; |
| 23 | } |
| 24 | if (!isStarted) { |
| 25 | throw Exception("Timer metric has not started."); |
| 26 | } |
| 27 | timer.stop(); |
| 28 | accumulatedTime += timer.getDuration(); |
| 29 | isStarted = false; |
| 30 | } |
| 31 | |
| 32 | double TimeMetric::getElapsedTimeMS() const { |
| 33 | return accumulatedTime / 1000; |
no test coverage detected