Zepha/src/util/PerfTimer.h

23 lines
331 B
C
Raw Permalink Normal View History

2021-07-07 15:39:04 -07:00
#pragma once
#include "Timer.h"
class PerfTimer {
public:
PerfTimer(const vec<string>& sections);
void start(const string& section);
void resume(const string& section);
2021-07-07 15:39:04 -07:00
vec<usize> end();
private:
void stopCurrent();
vec<string> sections;
vec<usize> timings = {};
string currentSection;
Timer timer = Timer();
};