Timer Class Reference

a timer, copyright (C) 1994-1997 Givaro Team; License: LGPL

#include <timer.h>

Collaboration diagram for Timer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Timer ()
void clear ()
 Clear timer :
void start ()
 Start timer.
void stop ()
 Stop timer.
void pauseTimer ()
 pause timer
void continueTimer ()
 continie timer // if timer is not running, not
double usertime () const
 total amount of second spent in user mode
double systime () const
 total amount of second spent in system mode
double realtime () const
 real total amount of second spent.

Private Attributes

timer state

bool b_IsRunning
bool b_Paused

Friends

class MtcpCheckpointManager

operators



size_t _count
RealTimer rt
UserTimer ut
SysTimer st
Timeroperator= (const Timer &T)
 Some arithmetic operator :
const Timer operator- (const Timer &T) const
 Comput._tes and returns interval of time beteween *this and T.
const Timer operator- ()
const Timer operator+ (const Timer &T) const
Timeroperator+= (const Timer &T)
Timeroperator-= (const Timer &T)
std::ostream & print (std::ostream &) const
size_t count () const

Detailed Description

Definition at line 113 of file timer.h.


Constructor & Destructor Documentation

Timer::Timer (  )  [inline]

Definition at line 118 of file timer.h.

References clear().

Here is the call graph for this function:


Member Function Documentation

void Timer::clear (  ) 

Definition at line 162 of file timer.C.

References _count, b_IsRunning, b_Paused, BaseTimer::clear(), rt, st, and ut.

Referenced by nCenterFocus::centerfocus(), and Timer().

Here is the call graph for this function:

void Timer::continueTimer (  ) 

Definition at line 175 of file timer.C.

References _count, b_IsRunning, b_Paused, rt, st, SysTimer::start(), UserTimer::start(), RealTimer::start(), and ut.

Referenced by MtcpCheckpointManager::connectTimer(), and MtcpCheckpointManager::disconnectTimer().

Here is the call graph for this function:

size_t Timer::count (  )  const [inline]

Definition at line 160 of file timer.h.

References _count.

Referenced by operator<<().

const Timer Timer::operator+ ( const Timer T  )  const

Definition at line 250 of file timer.C.

References _count, rt, st, and ut.

Timer& Timer::operator+= ( const Timer T  )  [inline]

Definition at line 154 of file timer.h.

const Timer Timer::operator- (  ) 

Definition at line 240 of file timer.C.

References _count, rt, st, and ut.

const Timer Timer::operator- ( const Timer T  )  const

Definition at line 230 of file timer.C.

References _count, rt, st, and ut.

Timer& Timer::operator-= ( const Timer T  )  [inline]

Definition at line 155 of file timer.h.

Timer & Timer::operator= ( const Timer T  ) 

Definition at line 220 of file timer.C.

References _count, rt, st, and ut.

void Timer::pauseTimer (  ) 

Definition at line 205 of file timer.C.

References _count, b_IsRunning, b_Paused, rt, st, SysTimer::stop(), UserTimer::stop(), RealTimer::stop(), and ut.

Referenced by MtcpCheckpointManager::connectTimer(), and MtcpCheckpointManager::disconnectTimer().

Here is the call graph for this function:

std::ostream & Timer::print ( std::ostream &  o  )  const

Definition at line 212 of file timer.C.

References realtime(), systime(), and usertime().

Here is the call graph for this function:

double Timer::realtime (  )  const [inline]

Definition at line 143 of file timer.h.

References rt, and BaseTimer::time().

Referenced by operator<<(), and print().

Here is the call graph for this function:

void Timer::start (  ) 

Definition at line 166 of file timer.C.

References _count, b_IsRunning, b_Paused, rt, st, SysTimer::start(), UserTimer::start(), RealTimer::start(), and ut.

Referenced by nCenterFocus::centerfocus().

Here is the call graph for this function:

void Timer::stop (  ) 

Definition at line 191 of file timer.C.

References _count, b_IsRunning, b_Paused, rt, st, SysTimer::stop(), UserTimer::stop(), RealTimer::stop(), and ut.

Referenced by nCenterFocus::centerfocus().

Here is the call graph for this function:

double Timer::systime (  )  const [inline]

Definition at line 140 of file timer.h.

References st, and BaseTimer::time().

Referenced by print().

Here is the call graph for this function:

double Timer::usertime (  )  const [inline]

Definition at line 137 of file timer.h.

References BaseTimer::time(), and ut.

Referenced by operator<<(), outputTimerInfoEx(), and print().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class MtcpCheckpointManager [friend]

Definition at line 115 of file timer.h.


Member Data Documentation

size_t Timer::_count [private]

Definition at line 163 of file timer.h.

Referenced by clear(), continueTimer(), count(), operator+(), operator-(), operator=(), pauseTimer(), start(), and stop().

bool Timer::b_IsRunning [private]

Definition at line 171 of file timer.h.

Referenced by clear(), continueTimer(), pauseTimer(), start(), and stop().

bool Timer::b_Paused [private]

Definition at line 172 of file timer.h.

Referenced by clear(), continueTimer(), pauseTimer(), start(), and stop().

RealTimer Timer::rt [private]

Definition at line 165 of file timer.h.

Referenced by clear(), continueTimer(), operator+(), operator-(), operator=(), pauseTimer(), realtime(), start(), and stop().

SysTimer Timer::st [private]

Definition at line 167 of file timer.h.

Referenced by clear(), continueTimer(), operator+(), operator-(), operator=(), pauseTimer(), start(), stop(), and systime().

UserTimer Timer::ut [private]

Definition at line 166 of file timer.h.

Referenced by clear(), continueTimer(), operator+(), operator-(), operator=(), pauseTimer(), start(), stop(), and usertime().


The documentation for this class was generated from the following files:
Generated on Tue Nov 23 13:10:53 2010 for centerfocus by  doxygen 1.6.3