delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/23/14:32:07

From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro and timer routines
Date: 23 Oct 1997 12:48:33 GMT
Organization: Oxford University, England
Lines: 17
Message-ID: <62nh31$7q9$2@news.ox.ac.uk>
References: <62mosa$nb5$1 AT postern DOT mbnet DOT mb DOT ca>
NNTP-Posting-Host: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Thu, 23 Oct 1997 06:10:27 GMT in comp.os.msdos.djgpp Mark Phillips (bigphil AT merlin DOT magic DOT mb DOT ca) wrote:
: What allegro routine do I use to make the computer pause for less than
: one millisecond?   rest() is the only function i know and its lowest
: denomination is one millisecond. please help me out.

The only such technique I'm aware of would be to install your own
high-resolution timer callback (register it with Allegro using
install_int_ex) and incrementing a global (or file-global) variable in the
callback. Then write your own delaying function which waits for this
counter to have incremented by the parameter passed to the function. Don't
forget to lock the callback function and counter variable, and make the
counter variable `volatile'.

-- 
Regards,

george DOT foot AT merton DOT oxford DOT ac DOT uk

- Raw text -


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