www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/17/18:57:11

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: exact timming : Q: How exact?
Date: Mon, 17 Feb 1997 20:09:05 +0000
Organization: None
Distribution: world
Message-ID: <2F3eWGAhrLCzEwzd@talula.demon.co.uk>
References: <199702111201 DOT NAA17664 AT atrey DOT karlin DOT mff DOT cuni DOT cz>
<5e10ub$479u AT elmo DOT cadvision DOT com>
<330889A4 DOT 3C4B AT eev DOT e-technik DOT uni-erlangen DOT de>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 20
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Schuster writes:
>How exact can timing be done. I have an application, where i'd 
>need 0.1 ms exact timing, could this be done with allegro ?

Allegro's timer routines are based on interrupts rather than clock
polling. This means that they are extremely accurate (a lot better than
0.1 ms) if you know the interval you want to time in advance, or need
ticks to occur at regular intervals, but they aren't much use if you
have a given task and just want to measure how long it takes to
complete.

That's under DOS: when running under Windows I use a different version
of the timer code that only gives 1/200th sec accuracy (blame Bill, not
me: he decided that DOS apps didn't need to adjust the clock speed more
than once per program :-)

/*
 *  Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
 *  Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'.
 */

- Raw text -


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