#include "Timer.h" Timer::Timer(int n) { this->counters = new unsigned __int64[n]; QueryPerformanceFrequency((LARGE_INTEGER*)&freq); } void Timer::Start(int counter) { QueryPerformanceCounter((LARGE_INTEGER*)&this->counters[counter]); } float Timer::Get(int counter, int multiply) { unsigned __int64 end; QueryPerformanceCounter((LARGE_INTEGER*)&end); return (float(end - this->counters[counter]) / freq) * multiply; } Timer::~Timer(void) { delete [] this->counters; }