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.
 Entire forum ➜ MUSHclient ➜ Bug reports ➜ Timers not firing properly

Timers not firing properly

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


Pages: 1 2  

Posted by Natasi   (79 posts)  Bio
Date Wed 05 Sep 2007 01:18 AM (UTC)
Message
For some reason, when I was creating a Timer to fire, I noticed it was not firing properly.

This is the Timer I am using.

<timers>
<timer name="VibrationTimer" enabled="y" second="30.00" send_to="10"
>
<send>VibrationCheck</send>

</timer>
</timers>


Now, I have it set to fire every 30 seconds...yet it is firing every 50-52 seconds. I tried resetting everything. I just reinstalled Windows a few weeks ago and this is the first time I've had an issue. Is there something I could be doing wrong? I've been using Mushclient since '99 and have never had issues with Timers, so a little confused here.
Top

Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Reply #1 on Wed 05 Sep 2007 05:41 AM (UTC)
Message
I just copied and pasted that into an open world I have. Seemed to work fine for me. Try setting the send_to=2 so that you are sure it is actually firing every 30 seconds. If it is, and the script just isn't running every 30 seconds, then the problem is with the script. If it is actually firing every 50-52 seconds, then there are bigger issues at work here.

It is much easier to fight for one's ideals than to live up to them.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #2 on Wed 05 Sep 2007 01:37 PM (UTC)

Amended on Wed 05 Sep 2007 10:40 PM (UTC) by Zeno

Message
Is your computer clock working fine?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Natasi   (79 posts)  Bio
Date Reply #3 on Wed 05 Sep 2007 01:52 PM (UTC)
Message
Yeah, like I said, I just reinstalled windows a few weeks ago. I don't have any viruses or anything as I strictly use this laptop for coding on Mushclient now. I'm really not sure what can be going wrong. I tried all the different formats of making a timer, even the doafter versions and everything is running weird.
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #4 on Wed 05 Sep 2007 09:48 PM (UTC)
Message
Timers are implemented in MUSHclient by periodically checking the list of timers against the current time. The interval of this check is set up in Global Preferences -> Timers.

If you had set that to 50 (seconds) - for some reason - then timers would only be checked every 50 seconds, thus leading to the sort of behaviour you describe. Even setting it to 20 seconds would probably do it, as if the timer was about to fire (eg. at 29 seconds elapsed) then it would check again in 20 seconds (at 49 seconds elapsed).

If this doesn't explain it, we need to establish if timers are out by a factor or an amount. In your described case, you expected 30 seconds, but got 50 seconds. Thus the amount is 20 seconds, however the factor is 50/30 (1.66).

So, you could try adding other timers (or changing the existing one) to see if it is always 20 seconds late, or always 1.66 times late.

For example, if you make a timer to fire in 10 seconds, will it fire in 30 seconds (20 seconds late) or in 16 seconds (1.66 times late)?

Another thing to try would be lots of extra timers (eg. just doing a "send to output" of some test message). Do they all fire at the same (incorrect) time, or randomly fire at different incorrect times? Or do some fire at the correct times and some not?

- Nick Gammon

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

Posted by Natasi   (79 posts)  Bio
Date Reply #5 on Fri 02 Nov 2007 01:21 AM (UTC)

Amended on Fri 02 Nov 2007 01:32 AM (UTC) by Natasi

Message
I know I haven't gotten back to this issue in awhile, but I just tested this this afternoon, with a new setup, on a new system I'm writing that had no timers. This is what happened when I made a new timer that sends to world to "dance" every 10 seconds. As you will see, the first one fires and 4.3 seconds later the next fires...then after it repeatedly goes to 17.5 seconds on average to fire...


You sweep across the floor, leaping and twirling like a true master.
4122h, 4941m, 4668e, 10p, elrx<>-|Safe|
dance
You sweep across the floor, leaping and twirling like a true master.
4122h, 4941m, 4668e, 10p, elrx<>-|Safe|{4.34375}
dance
You sweep across the floor, leaping and twirling like a true master.
4122h, 4941m, 4668e, 10p, elrx<>-|Safe|{17.625}
dance
You sweep across the floor, leaping and twirling like a true master.
4122h, 4941m, 4668e, 10p, elrx<>-|Safe|{17.48438}
dance
You sweep across the floor, leaping and twirling like a true master.
4122h, 4941m, 4668e, 10p, elrx<>-|Safe|{17.5}
sigh
You give a pained sigh.
4122h, 4941m, 4668e, 10p, elrx<>-|Safe|{2.546875}
Top

Posted by Natasi   (79 posts)  Bio
Date Reply #6 on Fri 02 Nov 2007 01:37 AM (UTC)

Amended on Fri 02 Nov 2007 02:18 AM (UTC) by Natasi

Message
I just checked my windows and the clock is running fun, I even ran the update on it and still my timer output in mushclient is lagging. I also just downloaded and re-installed the newest mushclient and still having the problem.
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #7 on Fri 02 Nov 2007 03:14 AM (UTC)
Message
Can you please tell me what timer interval is set up in the Global Preferences -> Timers tab?

- Nick Gammon

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

Posted by Natasi   (79 posts)  Bio
Date Reply #8 on Fri 02 Nov 2007 03:29 AM (UTC)

Amended on Fri 02 Nov 2007 03:32 AM (UTC) by Natasi

Message
It was set at 0 for the above tests. I just uninstalled Mush and re-installed another new copy and still having the issue. The Global preference Interval is at 1 now, which was teh default. I assume it has something to do with my computer, as I tried it on my macpro and my other pc and I dont have the issue on them...its only on this one. Is there any test that I can perform to figure out wtf is going on?
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #9 on Fri 02 Nov 2007 05:08 AM (UTC)
Message
I am mystified by this, particularly as it only seems to happen on this PC.

If you make it to dance every second, do you still have about a 10 second delay?

- Nick Gammon

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

Posted by Natasi   (79 posts)  Bio
Date Reply #10 on Fri 02 Nov 2007 10:58 AM (UTC)
Message
Seems to be almost a 75% delay, as I tried it with a 5sec timer and it fires every 8.6 seconds and other timers and same issues.
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #11 on Fri 02 Nov 2007 09:05 PM (UTC)
Message
I would still like you to briefly try one firing every second. That might narrow it down a bit to a fixed delay (of a few seconds) or some sort of percentage delay.

- Nick Gammon

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

Posted by Natasi   (79 posts)  Bio
Date Reply #12 on Fri 02 Nov 2007 10:44 PM (UTC)
Message
I have tried a 1second timer, which was how I noticed the issue in the first place. Each 1second action was taking about 1.7 seconds to fire when set at 1 second. Thats where I came up with the 75%, since the 10seconds was going to 17.5 and the 1 second was going to 1.7.
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #13 on Sat 03 Nov 2007 12:15 AM (UTC)
Message
That is very strange. If it is a simple factor, how about simply making the timer interval smaller? For example, for a 10 second timer, actually type in 7 seconds.

- Nick Gammon

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

Posted by TFMurphy   (3 posts)  Bio
Date Reply #14 on Tue 14 Apr 2009 04:57 PM (UTC)
Message
I recently had to debug this issue on my own computer, and traced the problem to the use of QueryPerformanceCounter by MUSHClient combined with my AMD DualCore processor and my use of Windows XP. The specific issue I was suffering from can be read about here: http://support.microsoft.com/kb/895980

The solution, in my case, was to edit boot.ini and add the /usepmtimer line.

I know this is an old bug report, but seeing how it did not seem to reach a satisfactory conclusion and that this was my first port of call in searching for a solution to my timer problems and trying to figure out why they were taking so long to fire, I thought it best to add my own findings and how I solved it for other people with this problem.
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.


53,970 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

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.