MCPcopy Create free account
hub / github.com/boutproject/BOUT-dev / resetTime

Method resetTime

src/sys/timer.cxx:63–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63double Timer::resetTime(Timer::timer_info& info) {
64 auto current_duration = info.time;
65 info.time = clock_type::duration{0};
66 if (info.running) {
67 const auto current_time = clock_type::now();
68 const auto elapsed = current_time - info.started;
69 current_duration += elapsed;
70 info.started = current_time;
71 info.total_time += elapsed;
72 }
73 return seconds{current_duration}.count();
74}
75
76void Timer::printTimeReport() {
77 using namespace std::string_literals;

Callers 1

TESTFunction · 0.80

Calls 1

nowFunction · 0.85

Tested by 1

TESTFunction · 0.64