Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

WindowsTimer Class Reference

Inheritance diagram for WindowsTimer:

Inheritance graph
Collaboration diagram for WindowsTimer:

Collaboration graph
List of all members.

Public Member Functions

double getTime () const
void reset ()
 WindowsTimer ()
 ~WindowsTimer ()

Private Attributes

LARGE_INTEGER freq
LARGE_INTEGER start

Constructor & Destructor Documentation

WindowsTimer::WindowsTimer  ) 
 

Definition at line 27 of file wintimer.cpp.

References freq, and reset().

00028 {
00029     QueryPerformanceFrequency(&freq);
00030     reset();
00031 }

WindowsTimer::~WindowsTimer  ) 
 

Definition at line 33 of file wintimer.cpp.

00034 {
00035 }


Member Function Documentation

double WindowsTimer::getTime  )  const [virtual]
 

Implements Timer.

Definition at line 37 of file wintimer.cpp.

References freq, and start.

00038 {
00039     LARGE_INTEGER t;
00040     QueryPerformanceCounter(&t);
00041     return (double) (t.QuadPart - start.QuadPart) / (double) freq.QuadPart;
00042 }

void WindowsTimer::reset  )  [virtual]
 

Implements Timer.

Definition at line 44 of file wintimer.cpp.

References start.

Referenced by WindowsTimer().

00045 {
00046     QueryPerformanceCounter(&start);
00047 }


Member Data Documentation

LARGE_INTEGER WindowsTimer::freq [private]
 

Definition at line 22 of file wintimer.cpp.

Referenced by getTime(), and WindowsTimer().

LARGE_INTEGER WindowsTimer::start [private]
 

Definition at line 23 of file wintimer.cpp.

Referenced by getTime(), and reset().


The documentation for this class was generated from the following file:
Generated on Sat Jan 14 22:33:43 2006 for Celestia by  doxygen 1.4.1