MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / getDuration

Method getDuration

src/include/common/timer.h:25–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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();

Callers 1

stopMethod · 0.80

Calls 1

countMethod · 0.45

Tested by

no test coverage detected