123456789101112131415161718192021222324 |
- #include "TimerCounter.h"
- #include <iostream>
- #include <windows.h>
- using namespace std;
- TimerCounter::TimerCounter(void)
- {
- QueryPerformanceFrequency(&freq);
- }
- TimerCounter::~TimerCounter(void)
- {
- }
- void TimerCounter::Start()
- {
- QueryPerformanceCounter(&startCount);
- }
- void TimerCounter::Stop()
- {
- QueryPerformanceCounter(&endCount);
-
- dbTime=((double)endCount.QuadPart-(double)startCount.QuadPart)/(double)freq.QuadPart;
-
- }
|