i was also displeased with this. so i went on a little adventure, built my own clock based on System.nanotime(), and created my own animation driver. however, it is non-trivial to produce a steady clock and frame rate. so, eventually i just went back to FPS animator.
the problem with a fixed frame rate is that at the end of the day it involves prediction. and all that a programmer can do really is make a guess based upon how long the last frame took to process and render. of course, basing your frame delta time calculations on the last frame will get you in the ballpark, but ultimately, it’s just not going to be steady.
i wasn’t satisfied still, so i spent time looking into this issue. it’s the same everywhere in computing – for audio, for C code, everywhere. if you want to look up the technical terms, it’s referred to as DRIFT and JITTER. computers are not good at steady clock, and usually can only achieve this via buffering time. the basic process to keep two times for everything. first, you calculate what time it should be. for example if we are on frame 10 at 60fps, the time now SHOULD be ( .166666666… * 10 ) seconds. then what you do is manually adjust the page flip to the perfect time by adding delay, or going early. however, this involves latency. so if you arrive at the page flip 3 milliseconds early, you just burn some thread time then flip. even if you don’t mind the latency this creates, when i ask the thread to kick it and chill for a bit you CANNOT be assured that it will do so accurately. i found that thread sleep times vary by platform, and reliability. so, if the delay you ask for to match perfect time isn’t even reliable, what’s the point? btw, the technique described above is the same that is used for VOIP to ensure streamed audio stays together and is typically called a de-jitter buffer.
in the world of audio production, people pay big bucks to create a steady clock buy purchasing specialized hardware clocks. i’m not a games programming expert, but after spending the time i did on this subject, i found i was just fine with FPS animator because i proved to myself that the better solutions are a lot of work and aren’t really that much better.
i found that time spent pooling objects and carefully managing GC is a more practical way to get a steady rate.
btw, this is a HUGE topic in real time graphics, and audio. there is no good solution currently that is universal among platforms. in the old days, they would use the screen refresh as the clock because it’s pretty steady, but you can’t even really do that anymore.