Add Profiler::Clock::seconds

master
Webster Sheets 2020-03-27 16:42:24 -04:00
parent 04059e32a0
commit 2376b050eb
1 changed files with 5 additions and 0 deletions

View File

@ -221,6 +221,11 @@ namespace Profiler {
return dur.count();
}
f64 seconds() {
std::chrono::duration<f64> dur = std::chrono::steady_clock::duration(ticks);
return dur.count();
}
f64 milliseconds() { return ms(ticks); }
f64 currentmilliseconds() { return ms(ticks + (getticks() - started)); }
f64 avg() { return average(ticks, calls); }