Pyrogenesis  trunk
Public Member Functions | Private Attributes | List of all members
CounterQPC Class Reference
Inheritance diagram for CounterQPC:
Inheritance graph
[legend]
Collaboration diagram for CounterQPC:
Collaboration graph
[legend]

Public Member Functions

 CounterQPC ()
 
virtual const char * Name () const
 
Status Activate ()
 
void Shutdown ()
 
bool IsSafe () const
 
u64 Counter () const
 
size_t CounterBits () const
 
double NominalFrequency () const
 initial measurement of the tick rate. More...
 
double Resolution () const
 actual resolution [s]. More...
 
- Public Member Functions inherited from ICounter
virtual ~ICounter ()
 

Private Attributes

i64 m_frequency
 

Constructor & Destructor Documentation

CounterQPC::CounterQPC ( )
inline

Member Function Documentation

Status CounterQPC::Activate ( )
inlinevirtual

Implements ICounter.

u64 CounterQPC::Counter ( ) const
inlinevirtual
Returns
the current value of the counter (all but the lower CounterBits() bits must be zero)

Implements ICounter.

size_t CounterQPC::CounterBits ( ) const
inlinevirtual
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.

Implements ICounter.

bool CounterQPC::IsSafe ( ) const
inlinevirtual

Implements ICounter.

virtual const char* CounterQPC::Name ( ) const
inlinevirtual

Implements ICounter.

double CounterQPC::NominalFrequency ( ) const
inlinevirtual

initial measurement of the tick rate.

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

Implements ICounter.

double CounterQPC::Resolution ( ) const
inlinevirtual

actual resolution [s].

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

Implements ICounter.

void CounterQPC::Shutdown ( )
inlinevirtual

Implements ICounter.

Member Data Documentation

i64 CounterQPC::m_frequency
private

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