CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StopWatch Class Reference

#include <algorithm.h>

Inheritance diagram for StopWatch:
Collaboration diagram for StopWatch:

Public Member Functions

 StopWatch ()
 
void Start ()
 
void Stop ()
 
void Reset ()
 
double GetTime () const
 

Private Attributes

bool running_
 
timeval start_
 
timeval end_
 

Additional Inherited Members

- Private Member Functions inherited from SingleCopy
 SingleCopy ()
 

Detailed Description

Very simple StopWatch implementation. Currently the implementation does not allow a restart of a stopped watch. You should always reset the clock before you reuse it.

Stopwatch watch(); watch.Start(); // do nasty thing watch.Stop(); printf("%f", watch.GetTime());

Definition at line 95 of file algorithm.h.

Constructor & Destructor Documentation

StopWatch::StopWatch ( )
inline

Definition at line 97 of file algorithm.h.

Member Function Documentation

double StopWatch::GetTime ( ) const

Definition at line 75 of file algorithm.cc.

Referenced by swissknife::CommandMigrate::AnalyzeCatalogStatistics(), and swissknife::CommandMigrate::AbstractMigrationWorker< DerivedT >::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

void StopWatch::Reset ( )

Definition at line 68 of file algorithm.cc.

Referenced by swissknife::CommandMigrate::AbstractMigrationWorker< DerivedT >::operator()().

Here is the caller graph for this function:

void StopWatch::Start ( )

Definition at line 52 of file algorithm.cc.

Referenced by swissknife::CommandMigrate::DoMigrationAndCommit(), swissknife::CommandMigrate::Main(), and swissknife::CommandMigrate::AbstractMigrationWorker< DerivedT >::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

void StopWatch::Stop ( )

Definition at line 60 of file algorithm.cc.

Referenced by swissknife::CommandMigrate::DoMigrationAndCommit(), swissknife::CommandMigrate::Main(), and swissknife::CommandMigrate::AbstractMigrationWorker< DerivedT >::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

timeval StopWatch::end_
private

Definition at line 107 of file algorithm.h.

bool StopWatch::running_
private

Definition at line 106 of file algorithm.h.

timeval StopWatch::start_
private

Definition at line 107 of file algorithm.h.


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