Hi Folks,
I ran into a problem with PowerPoint and winmm timer events, that has led me to radically alter this file.
However, I'd appreciate a gut check from anyone more experienced with it than I.
The fundamental problem is that Powerpoint does a timeBeginPeriod(1), trying to set timer resolution to 1 ms; we steadfastly discard that, and continue generating time updates and events on a roughly 10 ms interval, this can, in rare situations, lead to some awkward delays.
Some investigation with a test program shows that most Windows systems start with a default resolution of 1 ms. This test program is attached; the 'average' reported at the top is the default resolution. Further, Windows seem to steadfastly ignore any timeBeginPeriod(x) where x > the current period. I surveyed about 6 systems; a mix on Win98/Win2k and Win XP. All but one rogue Win 2K system had a 1 ms timer interval (the rogue system had a 10 ms interval; why, I do not know). The MSDN pages suggest (but don't state clearly) that this is the expected behavior.
This behavior essentially means that on most Windows systems the timer resolution of winmm is 1ms and can not be changed.
So, question #1: anyone object if I fix the timer resolution at 1 ms?
Next, if I make this change, it makes the code in time.c, which is fairly awkward imho, even less efficient. We'll basically be scanning a loop every ms for no particularly good reason.
I couldn't stomach this, so I rewrote it. Question #2: anyone object to my change? I have tested it with my attached test program, and I appear to have gotten it right, but...
Thoughts? Comments? Flames? Suggestions I go back to my day job? <grin>
Cheers,
Jeremy