cgv
cgv::utils::Profiler< T > Class Template Reference

#include <profiler.h>

Detailed Description

template<typename T = std::string>
class cgv::utils::Profiler< T >

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;


The documentation for this class was generated from the following file: