Message-ID: <3308E08C.239D@post.comstar.ru> Date: Mon, 17 Feb 1997 14:49:48 -0800 From: Dim Zegebart Reply-To: zager AT post DOT comstar DOT ru Organization: zager AT post DOT comstar DOT ru MIME-Version: 1.0 To: Schuster CC: DJGPP Mail List Subject: Re: exact timming : Q: How exact? 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Schuster wrote: > > Calvin French wrote: > > > Why not pick up Allegro? Allegro has excellent high precision timer > > routines. If you like, you can also pick up my small library atimer > > (x2ftp.oulu.fi/pub/msdos/programming/djgpp2/atimer.zip) which requires > > Allegro but provides additional flexibility / ease of use. > > 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 ? For many years I'm using an exellent book "Programmers's Problem Solver for the IBM PC, XT&AT" by ROBERT JOURDAIN.1986 by Brady Books. It still have many usefull hints and solutions... ...timer ticks 1.192.180 times per second... It's mean you may have 1 microsecond resolution in you programm... ;) How to do it ? Just look at install_timer in timer.c (I talk about Allegro) for (x=0; x<4; x++) { if (i_love_bill) //I think it's when you run under Windows set_timer_rate(timer_delay); else set_timer(timer_delay); //I think it's when you run under Windows } -- Regards, Dim Zegebart, Moscow Russia.