www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/05/04/04:03:19

Date: Tue, 4 May 1999 11:01:04 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp-workers AT delorie DOT com
Subject: Timer ticks under Windows 9X
Message-ID: <Pine.SUN.3.91.990504105916.16899C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

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!

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019