Not sure if this has been already reported, but I noticed a strange bug with the timer system in PRISM.
Here's how to reproduce the bug:
<?php
public function __construct()
{
$this->createTimer('logicTimer', 2.00, Timer::REPEAT);
$this->createTimer('uiTimer', 1.00, Timer::REPEAT);
}
?>
Alright so as you see the first timer is 2 seconds long and the second one is 1 second long.
Now create a simple callback function for each timer with a simple:
<?php
print('nameTimer elapsed.');
?>
name being the name of the timer - ui or logic in this case.
After running PRISM you will see that the 2 second timer stops after a few times elapsing.
Now flip the interval of the timers around to:
<?php
public function __construct()
{
$this->createTimer('logicTimer', 1.00, Timer::REPEAT);
$this->createTimer('uiTimer', 2.00, Timer::REPEAT);
}
?>
And now try run PRISM. You will see that it will work just fine every time.
Conclusion?
The timers seem to work perfectly when they are laid out in intervals from low to high in the construction function.
I'm not too sure if it's a bug or is supposed to happen, but it did get me confused until I figured it out