cgv
|
#include <profiler.h>
A profiler class for managing different stopwatches.
Example:
Profiler<> p;
p.prepare_counter("all"); p.prepare_counter("graphics"); p.prepare_counter("simulation");
... while(not_stopped) { stopwatch sa(p.get_time_accu("all")); { stopwatch ss(p.get_time_accu("simulation")); simulate(); } { stopwatch sr(p.get_time_accu("graphics")); render(); } } ... std::cout << p;