![]() |
|
Timer Fix - Printable Version +- Las Venturas Playground (https://forum.sa-mp.nl) +-- Forum: Miscellaneous (https://forum.sa-mp.nl/forum-4.html) +--- Forum: Gaming (https://forum.sa-mp.nl/forum-27.html) +--- Thread: Timer Fix (/thread-28250.html) |
Timer Fix - Slice - 10-19-2011 As seen on SA-MP forums.. I've recently been struggling with timers, and the fact that they aren't accurate by a damn sight. Here's an include that will make your timers accurate by ~5ms. For example, it will turn this output from one 250ms timer and one 1500ms timer: Code: [17:54:33] Time since last call: 293ms (43 ms off)into this: Code: [17:55:11] Time since last call: 251ms (1ms off)Usage You just have to add one single line of code after you included a_samp: Code: #include <timerfix>Limitations You can, by default, have only 128 timers running at the same time. If you feel the need to increase this, define TIMER_FIX_TIMER_SLOTS before you include the script. Something to keep in mind is this include causes PAWN to work harder; therefore, you shouldn't have loads of timers running at the same time as it will require higher CPU usage. Compatibility
Code: #define TIMER_FIX_DISABLE_EX true
Here: timerfix.inc |