Normal
I don't quite understand this. If you already know beforehand when you have to execute something (as you know the end timestamp say 10 minute jail time), why call it every second (assuming to compare etc). Why not use some kind of scheduled task, and cancel that scheduled task when someone logs out? Makes everything more event based, async and most likely faster. On top of that it is easier to add in new 'timers' / deadlines without having to modify your 'core loop' thus making it easier to maintain your code and build on it.Just a thought, no need to flame me. Here to give you suggestions about implementations you might want to try.
I don't quite understand this. If you already know beforehand when you have to execute something (as you know the end timestamp say 10 minute jail time), why call it every second (assuming to compare etc). Why not use some kind of scheduled task, and cancel that scheduled task when someone logs out? Makes everything more event based, async and most likely faster. On top of that it is easier to add in new 'timers' / deadlines without having to modify your 'core loop' thus making it easier to maintain your code and build on it.
Just a thought, no need to flame me. Here to give you suggestions about implementations you might want to try.