Scippy

SoPlex

Sequential object-oriented simPlex

WallclockTimer Class Reference

#include <wallclocktimer.h>

Inheritance diagram for WallclockTimer:

Public Member Functions

Construction / destruction
 WallclockTimer ()
 default constructor
 
 WallclockTimer (const WallclockTimer &old)
 copy constructor
 
WallclockTimeroperator= (const WallclockTimer &old)
 assignment operator
 
virtual ~WallclockTimer ()
 
Control
virtual void reset ()
 initialize timer, set timing accounts to zero.
 
virtual void start ()
 start timer, resume accounting user, system and real time.
 
virtual Real stop ()
 stop timer, return accounted user time.
 
virtual TYPE type ()
 return type of timer
 
Access
virtual Real time () const
 
virtual Real lastTime () const
 
- Public Member Functions inherited from Timer
 Timer ()
 default constructor
 
 Timer (const Timer &old)
 copy constructor
 
Timeroperator= (const Timer &old)
 assignment operator
 
virtual ~Timer ()
 
void getLastTimes (Real *userTime, Real *systemTime, Real *realTime) const
 return accounted time. get accounted user, system, or real time when ticks were updated last
 
Real realTimeLast () const
 return accounted real time without rechecking the clock
 

Private Member Functions

Internal helpers
Real wall2sec (long s, long us) const
 convert wallclock time to secounds.
 

Private Attributes

Data
long sec
 seconds
 
long usec
 microseconds
 
Real lasttime
 

Additional Inherited Members

- Public Types inherited from Timer
enum  TYPE { OFF = 0, USER_TIME = 1, WALLCLOCK_TIME = 2 }
 types of timers More...
 
- Protected Types inherited from Timer
enum  { RESET, STOPPED, RUNNING }
 status of the timer More...
 
- Protected Attributes inherited from Timer
enum soplex::Timer::{ RESET, STOPPED, RUNNINGstatus
 timer status
 

Detailed Description

Definition at line 29 of file wallclocktimer.h.

Constructor & Destructor Documentation

default constructor

Definition at line 59 of file wallclocktimer.h.

WallclockTimer ( const WallclockTimer old)

copy constructor

Definition at line 63 of file wallclocktimer.h.

virtual ~WallclockTimer ( )
virtual

Definition at line 75 of file wallclocktimer.h.

Member Function Documentation

Real lastTime ( ) const
virtual

Implements Timer.

Definition at line 119 of file wallclocktimer.cpp.

References WallclockTimer::lasttime.

WallclockTimer& operator= ( const WallclockTimer old)

assignment operator

Definition at line 67 of file wallclocktimer.h.

References WallclockTimer::lasttime, WallclockTimer::sec, and WallclockTimer::usec.

virtual void reset ( )
virtual

initialize timer, set timing accounts to zero.

Implements Timer.

Definition at line 83 of file wallclocktimer.h.

References WallclockTimer::lasttime, Timer::RESET, WallclockTimer::sec, Timer::status, and WallclockTimer::usec.

void start ( )
virtual

start timer, resume accounting user, system and real time.

Implements Timer.

Definition at line 33 of file wallclocktimer.cpp.

References WallclockTimer::lasttime, Timer::RUNNING, WallclockTimer::sec, Timer::status, WallclockTimer::time(), and WallclockTimer::usec.

Real stop ( )
virtual
virtual TYPE type ( )
virtual

return type of timer

Implements Timer.

Definition at line 97 of file wallclocktimer.h.

References Timer::WALLCLOCK_TIME.

Real wall2sec ( long  s,
long  us 
) const
private

convert wallclock time to secounds.

Definition at line 46 of file wallclocktimer.h.

Referenced by WallclockTimer::stop(), and WallclockTimer::time().

Member Data Documentation

long sec
mutableprivate
long usec
mutableprivate