[ODE] Timer?

Amund Børsand amund at c2i.net
Mon Feb 10 08:39:49 2003


Does anyone know a high (enough) resolution timer in C? I am using ODE
with the MingW-compiler, and I'm trying to make it real-time by
inserting the actual time from the last frame to the current into dWorldStep(). 

The function I'm currently using, clock() from time.h, claims to have
1000 CLOCKS_PER_SEC, but every now and then my t0-t (t0 being the
previous clock() and t being the current) function returns 0. Not just
every now and then, actually, but probably five times per second, when
I'm running the simulation at about 30-40 fps I guess. Is there some
other counter that is more accurate?



-- 
Amund Børsand <amund@c2i.net>