cgv
|
A profiler class for managing different stopwatches. More...
#include <profiler.h>
Public Member Functions | |
void | prepare_counter (const T &handle) |
double * | get_time_accu (const T handle) |
void | zero_counters () |
Friends | |
std::ostream & | operator<< (std::ostream &out, Profiler p) |
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;
Definition at line 44 of file profiler.h.
|
inline |
Definition at line 58 of file profiler.h.
|
inline |
Definition at line 51 of file profiler.h.
|
inline |
Definition at line 64 of file profiler.h.
|
friend |
Definition at line 75 of file profiler.h.