Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
CounterQPC Class Reference
Inheritance diagram for CounterQPC:
ICounter

Public Member Functions

 CounterQPC ()
 
virtual const wchar_tName () 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
 

Detailed Description

Definition at line 39 of file qpc.cpp.

Constructor & Destructor Documentation

CounterQPC::CounterQPC ( )
inline

Definition at line 42 of file qpc.cpp.

Member Function Documentation

Status CounterQPC::Activate ( )
inlinevirtual

Implements ICounter.

Definition at line 52 of file qpc.cpp.

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

Implements ICounter.

Definition at line 119 of file qpc.cpp.

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.

Definition at line 128 of file qpc.cpp.

bool CounterQPC::IsSafe ( ) const
inlinevirtual

Implements ICounter.

Definition at line 73 of file qpc.cpp.

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

Implements ICounter.

Definition at line 47 of file qpc.cpp.

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.

Definition at line 137 of file qpc.cpp.

double CounterQPC::Resolution ( ) const
inlinevirtual

actual resolution [s].

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

Implements ICounter.

Definition at line 142 of file qpc.cpp.

void CounterQPC::Shutdown ( )
inlinevirtual

Implements ICounter.

Definition at line 69 of file qpc.cpp.

Member Data Documentation

i64 CounterQPC::m_frequency
private

Definition at line 150 of file qpc.cpp.


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