iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::TimeProfiler< id > Class Template Reference

#include <nrt/Core/Debugging/TimeProfiler.H>

template<int id>
class nrt::TimeProfiler< id >

A simple set of CPU timers that can be accessed globally.

TimeProfiler are Singleton objects addressed by a simple integer ID number. This allows one to easily create and access several TimeProfiler instances to profile different aspects of their code.

Examples:
tests/test-rgb2hsv-Image_vs_Blitz_vs_OpenCV.C.

Definition at line 50 of file TimeProfiler.H.

Inheritance diagram for nrt::TimeProfiler< id >:
nrt::Singleton< TimeProfiler< id > >

Public Member Functions

void begin ()
 Begin one round of measuring user/sys/real time.
 
void end ()
 End current round of measuring user/sys/real time.
 
void reset ()
 Clear alle previous measuring rounds.
 
std::string report ()
 Report total and average user/sys/real time spent over all measuring rounds since construction or the last reset.
 

Additional Inherited Members

- Static Public Member Functions inherited from nrt::Singleton< TimeProfiler< id > >
static TimeProfiler< id > & instance ()
 Get the global, unique instance of the class T. More...
 
- Protected Member Functions inherited from nrt::Singleton< TimeProfiler< id > >
 Singleton ()
 Only classes that inherit from Singleton can construct it via its protected default constructor.
 

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