Message-ID: From: "Andris Pavenis" To: Eli Zaretskii , djgpp-workers AT delorie DOT com Date: Tue, 4 May 1999 11:44:47 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Timer ticks under Windows 9X In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.02b14) Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 4 May 99, at 11:01, Eli Zaretskii wrote: > > Windows 9X doesn't cease to surprise me... > > I noticed that the timer tick interrupts (Int 8, IRQ0) are NOT > delivered to a DOS box unless it has the focus. You can uncheck the > "Background: Always suspend" option in the property sheets (which is > what I did a long time ago), and then the program continues to run, > but it doesn't get the timer interrupts! My experience shows that DOS box is getting a part of interrupts in background (very rough estimate is 5-40% of all interrupts). I found that with my own software which uses IRQ 0 to simulate another interrupts (also timer but external, frequency normally is taken from time standard) so I can partially debug software that uses that without really having hardware on computer. It was rather annoying when I found that oprogram is getting very few interrupts so it's running terribly slow and I had to run it in foreground to have reasonable speed. > The effect of this is that `alarm' and `setitimer' (and probably > profiling as well) all stop working when the program's window is > in the background. A simple test program that defines a SIGALRM > handler which increments a counter, and then prints the counter > in its `main' function, will show you that the counter stops > updating when the focus is taken away from the program's window. > > I will update the docs for the related library functions, but if > somebody knows how to work around this ``feature'', I'd surely like > to know. >