delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/12/06:35:23

Date: Wed, 12 Jul 2000 13:34:25 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Edmund Horner <edmund1 AT geocities DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Timers
In-Reply-To: <963395605.641606@shelley.paradise.net.nz>
Message-ID: <Pine.SUN.3.91.1000712132900.2579D-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 12 Jul 2000, Edmund Horner wrote:

> Unfortunately it seems that this alarm will only be checked if DOS calls
> (such as IO) are made.

Actually, it's the other way around: when your program is inside a DOS 
call (e.g., if it waits for keyboard input), the alarm will NOT go off.
This is due to the limitations of the DPMI environment, which prohibits
hardware interrupt handlers from doing many non-trivial things.

> Do you have any suggestions for getting around this?

I don't think there's a problem to get around here.  If the code posted 
by Nate doesn't work as you expect, please post a complete program you 
used, tell what did you expect it to do and what did it actually do, and
chances are someone will either find a bug in your code or suggest how to 
change it so that it does what you want in the reall application you have 
in mind (which, btw, it might be a good idea to describe).

The alarm clock really works in DJGPP: the profiling facility is 
implemented using that functionality.  So it is certainly not limited to 
code that calls DOS.  Don't give up this option too easily.

- Raw text -


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