DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
Public Member Functions | Private Attributes | List of all members
spams::Timer Class Reference

#include <utils.h>

Detailed Description

Class Timer.

Definition at line 138 of file utils.h.

Public Member Functions

double getElapsed () const
 
void printElapsed ()
 
void reset ()
 
void start ()
 
void stop ()
 
 Timer ()
 
 ~Timer ()
 

Private Attributes

double _cumul
 
bool _running
 
struct timeval * _time1
 
struct timeval * _time2
 

Constructor & Destructor Documentation

spams::Timer::Timer ( )
inline

Empty constructor.

Constructor.

Definition at line 170 of file utils.h.

References _time1, and _time2.

spams::Timer::~Timer ( )
inline

Destructor.

Definition at line 176 of file utils.h.

References _time1, and _time2.

Member Function Documentation

double spams::Timer::getElapsed ( ) const
inline
void spams::Timer::printElapsed ( )
inline

print the elapsed time

Definition at line 182 of file utils.h.

References _cumul, _running, _time1, and _time2.

Referenced by spams::MinCostFlow< Int >::compute_min_cost(), spams::Graph< T >::proximal_operator(), spams::Trainer< T >::train(), and spams::Trainer< T >::trainOffline().

+ Here is the caller graph for this function:

void spams::Timer::reset ( )
inline

reset the timer

Definition at line 155 of file utils.h.

Referenced by spams::MinCostFlow< Int >::compute_min_cost(), spams::Tree_Seq< T >::dual_norm_inf(), and spams::Graph< T >::proximal_operator().

+ Here is the caller graph for this function:

void spams::Timer::start ( )
inline
void spams::Timer::stop ( )
inline

Member Data Documentation

double spams::Timer::_cumul
private

Definition at line 166 of file utils.h.

Referenced by getElapsed(), and printElapsed().

bool spams::Timer::_running
private

Definition at line 165 of file utils.h.

Referenced by getElapsed(), and printElapsed().

struct timeval* spams::Timer::_time1
private

Definition at line 163 of file utils.h.

Referenced by getElapsed(), printElapsed(), Timer(), and ~Timer().

struct timeval* spams::Timer::_time2
private

Definition at line 164 of file utils.h.

Referenced by getElapsed(), printElapsed(), Timer(), and ~Timer().


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