delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/30/06:48:32

Date: Wed, 30 Dec 1998 11:07:17 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Alexander Bokovoy <bokovoy AT bspu DOT unibel DOT by>
cc: djgpp AT delorie DOT com
Subject: Re: Setting up a timer every 1/100th second with user callback
In-Reply-To: <13420.981230@bspu.unibel.by>
Message-ID: <Pine.SUN.3.91.981230110112.21377Q-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Wed, 30 Dec 1998, Alexander Bokovoy wrote:

>   How should I write a routine for setting up a timer every 1/100th
>   second to call a global callback function of mine?

You can't, unless you hook the timer tick interrupt, and speed up the 
interrupt generation.  The package PCTIME14 (the FAQ has the exact URL on 
SimTel) has working code that does this, which you could use as a 
starting point.

I'd guess that Allegro has something to help you as well.

>   I tried to do such thing using signals but failed.

All timer-related services in DJGPP woirk in the default 54-msec 
resolution of the PC timer tick.  Doing otherwise would be too intrusive 
on the system, and is almost certainly break in some environment, which 
is bad for a general-purpose library.

- Raw text -


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