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. :)
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.
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.
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.
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.
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.
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.
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.
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.
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?
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.
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.