Jscript Timers or MUSHclient builtin

Posted by IREMUSH on Wed 03 Feb 2016 08:56 AM — 3 posts, 12,654 views.

#0
Jscript timers can be a pain in the butt and tend to have a decent amount of overhead am I better off recoding all my timer routines leveraging MUSHclient's builtin timers?

I use these for things like balance and equilibrium tracking when situations can suppress info from the prompt or from GMCP. So GMCP and or the prompt not tell you that you have balance back but based on a timer you know you should so go ahead and force reset those values so the system can carry on with actions.

Thanks
Australia Forum Administrator #1
I'm not sure about Jscript timers, but you don't want anything that blocks execution of the code.

If you were using Lua you can use co-routines, which let a function yield execution, to be resumed later (eg. by a trigger match or timer firing).
#2
Yeah jscript timers are non-blocking. I have a bunch of them guess I'll test the performance of both and see what they do to memory and system load, though the less of an issue with a full client behind the code than a web based client that is constrained by the browser.