delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/04/06:17:58

Date: Mon, 4 Jan 1999 13:16:33 +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 <djgpp AT delorie DOT com>
Subject: Re: Setting up a timer every 1/100th second with user callback
In-Reply-To: <10415.990104@bspu.unibel.by>
Message-ID: <Pine.SUN.3.91.990104131251.26097C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Mon, 4 Jan 1999, 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?
>   I tried to do such thing using signals but failed. Any suggestions?

I think you already asked this, and I think I replied.  My previous 
reply is attached.

From eliz AT is DOT elta DOT co DOT ilMon Jan  4 13:15:11 1999
Date: Wed, 30 Dec 1998 11:07:17 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
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

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