N
Nothingman
Hi!
I'd like to get time in miliseconds of working some algorithms. Could you
tell me if this program is OK??
#include <windows.h>
#include <iostream.h>
int main(int argc, char* argv[])
{
LONGLONG frequency, currentTime, lastTime;
double timeScale;
QueryPerformanceFrequency( (LARGE_INTEGER*) &frequency);
timeScale = (1.0/frequency)*1000.0;
QueryPerformanceCounter( (LARGE_INTEGER*) &lastTime);
some_algorithms();
QueryPerformanceCounter( (LARGE_INTEGER*) ¤tTime);
double milisec = (currentTime-lastTime)*timeScale;
cout << milisec;
return 0;
}
Thank You
Nothingman
I'd like to get time in miliseconds of working some algorithms. Could you
tell me if this program is OK??
#include <windows.h>
#include <iostream.h>
int main(int argc, char* argv[])
{
LONGLONG frequency, currentTime, lastTime;
double timeScale;
QueryPerformanceFrequency( (LARGE_INTEGER*) &frequency);
timeScale = (1.0/frequency)*1000.0;
QueryPerformanceCounter( (LARGE_INTEGER*) &lastTime);
some_algorithms();
QueryPerformanceCounter( (LARGE_INTEGER*) ¤tTime);
double milisec = (currentTime-lastTime)*timeScale;
cout << milisec;
return 0;
}
Thank You
Nothingman