Mail Archives: djgpp/1994/09/30/23:29:21
On Thu, 29 Sep 1994, Victor K. Chu wrote:
> Dear DJGPP Users,
>
> It seems to me that the accuracy we can get from the time()
> function is only 1/18.2 second (about 55 mili-seconds), even
> though CLOCKS_PER_SEC is defined as 1000000 in time.h.
>
> I wonder if anyone knows that there is any way to get a more
> accurate time?
>
> Thanks,
> Victor Chu
>
Check the archives of the list... there were two posts of a timer
reading function. The C version is called hrtimer.c, which is based on
the original ASM routines called timer16() and timer32(). timer32() reads
the time-clock chip at a resolution of roughly 1 microsecond. I recently
compiled the C version with v1.12m2 and they work. I'll dig up the
original post(s) if you'd like.
Ed
/****************************************************************************/
/* Ed Phillips flaregun AT strauss DOT udel DOT edu University of Delaware */
/* Jr Systems Programmer (302) 831-6082 IT/Network and Systems Services */
/****************************************************************************/
- Raw text -