Pol  Revision:cb584c9
Pol::Tools::Timer< printer > Class Template Reference

#include <timer.h>

+ Inheritance diagram for Pol::Tools::Timer< printer >:

Public Member Functions

 Timer (std::string name)
 
 Timer ()
 
 ~Timer ()
 
long long ellapsed () const
 
double ellapsed_s () const
 
void print () const
 
void start ()
 
void stop ()
 

Private Types

typedef std::chrono::high_resolution_clock Clock
 
typedef std::chrono::milliseconds ms
 

Private Attributes

Clock::time_point _end
 
std::string _name
 
Clock::time_point _start
 

Detailed Description

template<class printer = SilentT>
class Pol::Tools::Timer< printer >

Definition at line 29 of file timer.h.

Member Typedef Documentation

template<class printer = SilentT>
typedef std::chrono::high_resolution_clock Pol::Tools::Timer< printer >::Clock
private

Definition at line 31 of file timer.h.

template<class printer = SilentT>
typedef std::chrono::milliseconds Pol::Tools::Timer< printer >::ms
private

Definition at line 32 of file timer.h.

Constructor & Destructor Documentation

template<class printer >
Pol::Tools::Timer< printer >::Timer ( std::string  name)

Definition at line 18 of file timer.cpp.

References Pol::Tools::Timer< printer >::start().

template<class printer >
Pol::Tools::Timer< printer >::Timer ( )

Definition at line 23 of file timer.cpp.

References Pol::Tools::Timer< printer >::start().

Member Function Documentation

template<class printer >
double Pol::Tools::Timer< printer >::ellapsed_s ( ) const

Definition at line 54 of file timer.cpp.

References Pol::Tools::Timer< printer >::ellapsed().

template<class printer >
void Pol::Tools::Timer< printer >::print ( ) const
template<class printer >
void Pol::Tools::Timer< printer >::start ( )

Member Data Documentation

template<class printer = SilentT>
Clock::time_point Pol::Tools::Timer< printer >::_end
private
template<class printer = SilentT>
std::string Pol::Tools::Timer< printer >::_name
private
template<class printer = SilentT>
Clock::time_point Pol::Tools::Timer< printer >::_start
private

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