fastjet::atlas::stopwatch Class Reference

#include <CommonUtils.hh>

List of all members.

Public Member Functions

 stopwatch ()
void start ()
void resume ()
float pause ()
float stop ()

Protected Member Functions

float convert ()

Protected Attributes

std::clock_t m_last
std::clock_t m_total

Detailed Description

Definition at line 55 of file CommonUtils.hh.


Constructor & Destructor Documentation

fastjet::atlas::stopwatch::stopwatch (  )  [inline]

Definition at line 57 of file CommonUtils.hh.

00057 : m_total(0){};


Member Function Documentation

float fastjet::atlas::stopwatch::convert (  )  [inline, protected]

Definition at line 71 of file CommonUtils.hh.

00071 { return float(m_total)*1000/CLOCKS_PER_SEC;}

float fastjet::atlas::stopwatch::pause (  )  [inline]

Definition at line 60 of file CommonUtils.hh.

00060                 {
00061     std::clock_t now=std::clock();
00062     m_total = m_total +  now - m_last;
00063     m_last = now;
00064     return convert();
00065   }

void fastjet::atlas::stopwatch::resume (  )  [inline]

Definition at line 59 of file CommonUtils.hh.

00059 {m_last = std::clock();};

void fastjet::atlas::stopwatch::start (  )  [inline]

Definition at line 58 of file CommonUtils.hh.

00058 {m_last = std::clock();};

float fastjet::atlas::stopwatch::stop (  )  [inline]

Definition at line 66 of file CommonUtils.hh.

00066 {float t=pause(); m_total = std::clock_t(0); return t;}


Member Data Documentation

std::clock_t fastjet::atlas::stopwatch::m_last [protected]

Definition at line 68 of file CommonUtils.hh.

std::clock_t fastjet::atlas::stopwatch::m_total [protected]

Definition at line 69 of file CommonUtils.hh.


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

Generated on 26 Feb 2010 for fastjet by  doxygen 1.6.1