I had a wireframe object and had a file describing how it moved in time. I was using C++ with Win32 libraries and the wireframe was running in an OpenGL window. The file described a smooth motion through time without any quick movements, and the code I wrote to do the movements worked well- most of the time. It worked very simply- with a Sleep(milliseconds) between each movement. Again, the transition was bang on most of the time. But sometimes the Sleep calls appeared to not wait at all and the mesh moved in an explosive display of fast movements as if there were no wait. So always the same input, the same code, but different iterations of the same program with different results. So is the problem the Windows clock? (are there known issues for things like this). And if yes, would a timer with a callback been better for some reason? Or is what I'm trying to do here not very easily achieved?
Thanks for any help!