Mail Archives: djgpp/1997/02/17/18:57:11
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 -