fastjet 2.4.3
Public Member Functions | Protected Member Functions | Protected Attributes

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

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

Definition at line 57 of file CommonUtils.hh.

: m_total(0){};

Member Function Documentation

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

Definition at line 71 of file CommonUtils.hh.

References m_total.

Referenced by pause().

{ return float(m_total)*1000/CLOCKS_PER_SEC;}
float atlas::stopwatch::pause ( ) [inline]

Definition at line 60 of file CommonUtils.hh.

References convert(), m_last, and m_total.

Referenced by stop().

                {
    std::clock_t now=std::clock();
    m_total = m_total +  now - m_last;
    m_last = now;
    return convert();
  }
void atlas::stopwatch::resume ( ) [inline]

Definition at line 59 of file CommonUtils.hh.

References m_last.

{m_last = std::clock();};
void atlas::stopwatch::start ( ) [inline]

Definition at line 58 of file CommonUtils.hh.

References m_last.

{m_last = std::clock();};
float atlas::stopwatch::stop ( ) [inline]

Definition at line 66 of file CommonUtils.hh.

References m_total, and pause().

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

Member Data Documentation

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

Definition at line 68 of file CommonUtils.hh.

Referenced by pause(), resume(), and start().

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

Definition at line 69 of file CommonUtils.hh.

Referenced by convert(), pause(), and stop().


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