Pyrogenesis  trunk
Public Member Functions | List of all members
ICounter Class Referenceabstract

#include <counter.h>

Inheritance diagram for ICounter:
Inheritance graph
[legend]

Public Member Functions

virtual ~ICounter ()
 
virtual const char * Name () const =0
 
virtual Status Activate ()=0
 
virtual void Shutdown ()=0
 
virtual bool IsSafe () const =0
 
virtual u64 Counter () const =0
 
virtual size_t CounterBits () const =0
 
virtual double NominalFrequency () const =0
 initial measurement of the tick rate. More...
 
virtual double Resolution () const =0
 actual resolution [s]. More...
 

Constructor & Destructor Documentation

virtual ICounter::~ICounter ( )
inlinevirtual

Member Function Documentation

virtual Status ICounter::Activate ( )
pure virtual
virtual u64 ICounter::Counter ( ) const
pure virtual
Returns
the current value of the counter (all but the lower CounterBits() bits must be zero)

Implemented in CounterTSC, CounterQPC, CounterHPET, CounterPMT, and CounterTGT.

virtual size_t ICounter::CounterBits ( ) const
pure virtual
Returns
the bit width of the counter (<= 64) WHRT uses this to ensure the counter (running at nominal frequency) doesn't overflow more than once during CALIBRATION_INTERVAL_MS.

Implemented in CounterTSC, CounterQPC, CounterHPET, CounterPMT, and CounterTGT.

virtual bool ICounter::IsSafe ( ) const
pure virtual
virtual const char* ICounter::Name ( ) const
pure virtual
virtual double ICounter::NominalFrequency ( ) const
pure virtual

initial measurement of the tick rate.

not necessarily correct (e.g. when using TSC: os_cpu_ClockFrequency isn't exact).

Implemented in CounterTSC, CounterQPC, CounterHPET, CounterPMT, and CounterTGT.

virtual double ICounter::Resolution ( ) const
pure virtual

actual resolution [s].

differs from 1/NominalFrequency if the timer adjustment is greater than 1 tick.

Implemented in CounterTSC, CounterQPC, CounterHPET, CounterPMT, and CounterTGT.

virtual void ICounter::Shutdown ( )
pure virtual

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