I'm trying to time some code and getting some weird results. I'm using some code like the following....
The problem is that i get what seems to be garbage elapsed times. For instance i'll get 324.34ms, 322.47ms, then get -500.23ms. Negative time makes no sense to me. I even tried using StopWatch and got similar results. I've also noticed that when timing something that is noticeably longer than another function it will return less elapsed time.
I'm running on a P4 2.8GHz machine and in my own C++ code i've never noticed any timer error.
Anyone seen these issues before? Is there another method to get timing in at least 100 millisecond resolution in UT2K4?
Code:
exec function DoMyTest()
{
local float elapsed;
Clock( elapsed );
// do some junk...
UnClock( elapsed );
ClientMessage( elapsed$ "ms" );
}
I'm running on a P4 2.8GHz machine and in my own C++ code i've never noticed any timer error.
Anyone seen these issues before? Is there another method to get timing in at least 100 millisecond resolution in UT2K4?
Last edited: