Mail Archives: djgpp/1998/11/12/06:00:19
>From: Diego Dominguez Cazorla <ddomingu AT mlg DOT cit DOT alcatel DOT es>
>To: "'djgpp'" <djgpp AT delorie DOT com>
>Subject: allegro and pctimer?
>Date: Thu, 12 Nov 1998 08:45:16 +0100
>Reply-To: djgpp AT delorie DOT com
>
> Hello!!!
>
> I have a program that does some processing stuff and another that acts
as
>a front-end. The front-end uses allegro (and bgui ;) and calls (with
>system(..) ) the processing one.
>
> Inside the processing program I use only allegro's timer again to
measure
>time used by each processing algorithm and write it down to a text file
to
>allow the front end to show them. (Of course I disable timer in the
>front-end before calling it, and enable it afterwards).
>
> The problem is that it seems to me that allegro's timer is not enough
>precise (number shown change a bit each execution, even after several
times
>to have cache stabilized). I tried with pctimer and things seemed to be
>better, but it WOULD hang up the system if called from the front-end.
>
> Do you know if it is possible to have alllegro, and (with allegro's
timer
>disabled) have a another timer to do the measuring? Do you know how
exact
>is allegro's timer?
try using the uclock() from the standard C lib that comes with DJGPP
its resolution is about 1 million and something ticks per second.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
- Raw text -