> I'm not sure why you'd want to base it on gettimeofday(). > This is a terrible idea IMHO. > I'm quite certain that many programs use that function for extremely time > critical code > (games, anyone??), and that thus the Windows function is equally highly > optimized, > certainly much less slow than a gettimeofday() call.
Well, if you find a way to do this that supports CPU with variable speed, feel free to submit a patch :-) I had the case on my laptop: a game using the PerformanceCounter functions to get the current time was running super fast as it was getting the 'frequency' at the start (when the CPU was still in power / heat saving mode). Forcing the 'gettimeofday' method got it working perfectly well whatever the cases. Lionel -- Lionel Ulmer - http://www.bbrox.org/