CPerformanceCounter Class Reference

Collaboration diagram for CPerformanceCounter:

Collaboration graph
[legend]

List of all members.


Detailed Description

A class that wraps the QueryPerformanceCounter() API for high performance timing of sections of code.


Public Types

enum  ThreadAffinity { NoThreadAffinity, LockThreadToOneCPU }

Public Member Functions

 CPerformanceCounter (ThreadAffinity threadAffinity=NoThreadAffinity)
 Constructs a timer with the specified thread affinity and starts it.
void Reset ()
 Resets a counter.
DWORD GetElapsedTimeAsDWORD () const
 Gets the elapsed time since the counter was either constructed or reset.
LARGE_INTEGER GetElapsedTime () const
 Gets the elapsed time since the counter was either constructed or reset.
_tstring GetElapsedTimeAsString () const
 Gets the elapsed time since the counter was either constructed or reset.


Member Enumeration Documentation

enum ThreadAffinity

Enumerator:
NoThreadAffinity 
LockThreadToOneCPU 


Constructor & Destructor Documentation

CPerformanceCounter ( ThreadAffinity  threadAffinity = NoThreadAffinity  )  [explicit]

Constructs a timer with the specified thread affinity and starts it.


Member Function Documentation

void Reset (  ) 

Resets a counter.

DWORD GetElapsedTimeAsDWORD (  )  const

Gets the elapsed time since the counter was either constructed or reset.

LARGE_INTEGER GetElapsedTime (  )  const

Gets the elapsed time since the counter was either constructed or reset.

_tstring GetElapsedTimeAsString (  )  const

Gets the elapsed time since the counter was either constructed or reset.


Generated on Thu Mar 26 16:40:42 2009 for JetByte Socket Tools - v6.0 by  doxygen 1.5.3