SECS_TO_TIMER(secs) - give the number of seconds between
each tick
MSEC_TO_TIMER(msec) - give the number of milliseconds
between ticks
BPS_TO_TIMER(bps) - give the number of ticks each second
BPM_TO_TIMER(bpm) - give the number of ticks per minute
Fx3 wrote:- It works perfectly for 50, 55... but not with 60 or a bit less. The number of frames per second isn't constant, but around 62~63. I wonder why...
- Yes, I need 60 FPS, but it doesn't work, keeps displaying 62~63 FPS.
Under what operating system?
60.0 Hz is 16.67 milliseconds per cycle. 16.0 milliseconds per cycle is 62.5 Hz. Not all operating systems make microsecond resolution timers available to processes running as a limited user. If you make a limited test case and send it to the Allegro team, someone with more knowledge of the program's insides might be able to make a more detailed diagnosis.
High-resolution timers don't work on some laptops and whatnot. Don't use them unless you have some sort of fallback timing solution, such as threads (which is how Allegro does timing in all versions up to and including 4.2).
Allegro 4.3 and onward is a completely separate codebase with a completely different API and much better design goals.