Skip to main content
GameDev.net gamedev.net
🔒 Locked

time calculation

Started by jazztuffy Aug 27, 2006 at 10:41 AM 4 replies 400+ views
Original Post
jazztuffy
jazztuffy
i am running an arthematic operation which can compute a matrix in few micro seconds...as i m using time function i am not able to get exact time. i m tryin to get 10^-4 and 10^-5 decimals of the time...can any of u help me out with this
Sharlin
Sharlin
The easiest way, if you want any precision, is to run the code, say, a hundred thousand or a million times, time that, and then divide manually. This will even out any anomalies caused by multitasking and other such things.
jazztuffy
jazztuffy
yeah i agree but i cannot do that for 1000 matrices....is there any in bulit function...i cannot keep calculating all the time...
Xetick
Xetick
Use QueryPerformanceCounter it gives you the current tick of the cpu.
Plane9 - Home of the free scene based music visualizer and screensaver
jazztuffy
jazztuffy
QuaryPerformance is an API related and not sure wheather it will run on console application

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.