Date: Mon, 4 Jan 1999 13:16:33 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Alexander Bokovoy cc: DJGPP Subject: Re: Setting up a timer every 1/100th second with user callback In-Reply-To: <10415.990104@bspu.unibel.by> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 To: Alexander Bokovoy 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.