Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Jscript Timers or MUSHclient builtin

Jscript Timers or MUSHclient builtin

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by IREMUSH   (12 posts)  Bio
Date Wed 03 Feb 2016 08:56 AM (UTC)
Message
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
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 03 Feb 2016 09:32 PM (UTC)
Message
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).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by IREMUSH   (12 posts)  Bio
Date Reply #2 on Thu 04 Feb 2016 04:23 AM (UTC)
Message
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.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


9,538 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.