fastjet 2.4.5
Public Member Functions | Protected Member Functions | Protected Attributes
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.

: m_total(0){};

Member Function Documentation

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

Definition at line 71 of file CommonUtils.hh.

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

Definition at line 60 of file CommonUtils.hh.

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

Definition at line 59 of file CommonUtils.hh.

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

Definition at line 58 of file CommonUtils.hh.

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

Definition at line 66 of file CommonUtils.hh.

{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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines