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
➜ 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
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #15 on Wed 15 Apr 2009 05:45 AM (UTC) |
Message
| I don't see where timers in particular are using the QueryPerformanceCounter, however if doing that solves the problem I am glad to hear it. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| TFMurphy
(3 posts) Bio
|
Date
| Reply #16 on Sat 18 Apr 2009 04:21 PM (UTC) |
Message
| Timers use it because they call GetTimeNow in mcdatetime.cpp to both update and reset themselves. GetTimeNow uses both QueryPerformanceFrequency and QueryPerformanceCounter if they're available. Unfortunately, there are a fair number of CPUs where these two commands do not return values you'd expect. My own issue with it was one of these.
It might be useful for there to be an option to not use these commands for checking time. Sure, you lose precision, but better that than not being able to get timers to fire when they're supposed to at all. | Top |
|
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Reply #17 on Sat 18 Apr 2009 08:03 PM (UTC) |
Message
| I think that if that happens, your windows needs patching to work around the bug and not your MUSHclient. MUSHclient can't be the only application that has faulty behaviour due to bugginess of the CPU implementation of QueryPerformanceCounter.
Hell, you listed the solution yourself in this topic. If anything, I'd recommend putting it into the FAQ so people can find information on the subject more easily. | Top |
|
Posted by
| TFMurphy
(3 posts) Bio
|
Date
| Reply #18 on Sun 19 Apr 2009 08:50 AM (UTC) |
Message
| Your Windows may need patching, yes. Or your BIOS, or the HAL or you might even need new hardware. The fix I mentioned is mainly used for AMD CPUs under Windows XP/2003: fixing it for other CPUs or under different versions of Windows requires different things.
MUSHClient does have the capability to do without QPC as-is: it simply checks to see whether QueryPerformanceFrequency returns anything. When QPC is available and is functioning correctly, it does lead to a more accurate timing than just using GetLocalTime... but it's arguably an unneeded accuracy when GetLocalTime should be accurate down to milliseconds already. I only noticed that my computer was suffering from the issue when MUSHClient's timers weren't working properly -- the system time was updating correctly, as was the GetConnectDuration script command I was using in one of my scripts.
I agree that overall, it's best that the underlying issue is fixed. I'm just concerned that the fix may not be as easy for all systems. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #19 on Sun 19 Apr 2009 11:11 AM (UTC) |
Message
|
Quote:
MUSHclient can't be the only application that has faulty behaviour due to bugginess of the CPU implementation of QueryPerformanceCounter.
It isn't really the CPU's fault - the OS gives me a way of finding if the performance counter is implemented, and I check it most times. This one slipped through. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Reply #20 on Sun 19 Apr 2009 02:43 PM (UTC) |
Message
| The way I understood the problem was that the Windows API gave you an A-OKAY response on the availability of the feature, but returned buggy values. If you weren't checking for the availability.. well, then I agree, MUSHclient needs fixing to check for the availability. :) | 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.
56,527 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top