#include <GenTimer.h>
Classes | |
struct | Bias |
Public Types | |
typedef Time::IntervalType | IntervalType |
typedef GenTimer< Time > | self |
typedef Time::TimeInterval | TimeInterval |
Public Member Functions | |
void | forceStop () |
GenTimer () | |
constructor | |
GenTimer (int ipid) | |
from known context | |
Time::TimeInterval | lap () const |
void | reset () |
bool | running () const |
void | start () |
void | stop () |
~GenTimer () | |
destructor | |
Static Public Member Functions | |
static double | bias (bool insec=true, unsigned int n=5000) |
static double | ticksInSec () |
Private Attributes | |
Time::IntervalType | elapsed |
int | pid |
int | running_ |
a templated generic timer
Definition at line 51 of file GenTimer.h.
typedef Time::IntervalType GenTimer< Time >::IntervalType |
Definition at line 54 of file GenTimer.h.
Definition at line 56 of file GenTimer.h.
typedef Time::TimeInterval GenTimer< Time >::TimeInterval |
Definition at line 53 of file GenTimer.h.
from known context
Definition at line 89 of file GenTimer.h.
static double GenTimer< Time >::bias | ( | bool | insec = true , |
unsigned int | n = 5000 |
||
) | [inline, static] |
Definition at line 77 of file GenTimer.h.
{ static Bias it(n); return insec ? it.mes : double(it.met) ; }
void GenTimer< Time >::forceStop | ( | ) | [inline] |
Definition at line 115 of file GenTimer.h.
Time::TimeInterval GenTimer< Time >::lap | ( | ) | const [inline] |
Definition at line 122 of file GenTimer.h.
Referenced by GenTimer< Time >::Bias::Bias(), TimeMe::lap(), TimingReport::Item::realsec(), and TimingReport::Item::stop().
{ if (running()) return (elapsed+Time::time(pid)); return elapsed; }
void GenTimer< Time >::reset | ( | void | ) | [inline] |
Definition at line 98 of file GenTimer.h.
{ if (running()) elapsed=-Time::time(pid); else elapsed=0; }
bool GenTimer< Time >::running | ( | ) | const [inline] |
Definition at line 95 of file GenTimer.h.
Referenced by TimingReport::Item::active(), GenTimer< PentiumTime >::lap(), and GenTimer< PentiumTime >::reset().
{ return running_>0;}
void GenTimer< Time >::start | ( | void | ) | [inline] |
Definition at line 104 of file GenTimer.h.
Referenced by GenTimer< Time >::Bias::Bias(), and TimingReport::Item::start().
{ running_++; if (running_==1) elapsed-=Time::time(pid); }
void GenTimer< Time >::stop | ( | ) | [inline] |
Definition at line 110 of file GenTimer.h.
Referenced by GenTimer< Time >::Bias::Bias(), GenTimer< PentiumTime >::forceStop(), and TimingReport::Item::stop().
static double GenTimer< Time >::ticksInSec | ( | ) | [inline, static] |
Definition at line 83 of file GenTimer.h.
{ return Time::oneTick();}
Definition at line 129 of file GenTimer.h.
Referenced by GenTimer< PentiumTime >::lap(), GenTimer< PentiumTime >::reset(), GenTimer< PentiumTime >::start(), and GenTimer< PentiumTime >::stop().
Definition at line 131 of file GenTimer.h.
Referenced by GenTimer< PentiumTime >::lap(), GenTimer< PentiumTime >::reset(), GenTimer< PentiumTime >::start(), and GenTimer< PentiumTime >::stop().
Definition at line 130 of file GenTimer.h.
Referenced by GenTimer< PentiumTime >::forceStop(), GenTimer< PentiumTime >::running(), GenTimer< PentiumTime >::start(), and GenTimer< PentiumTime >::stop().