www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/19/02:13:46

Date: Mon, 19 Apr 1999 10:11:45 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp AT delorie DOT com
Subject: Re: high resolution timer
In-Reply-To: <371a4ef6.1846448@noticias.iies.es>
Message-ID: <Pine.SUN.3.91.990419101113.15835H-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 18 Apr 1999, Guillermo Rodriguez Garcia wrote:

> Can anyone tell me how accurate is gettimeofday()?

55ms, of course: it gets the time from the DOS function 2Ch (as is
clear from looking at the sources ;-).

To solve your problem, either reprogram timer 2 (instead of the system
timer 0, like `uclock' does) and use it in the same way as `uclock';
or program the CMOS clock to generate interrupt 70h every 976.6
microseconds and install a handler that counts these interrupts.

- Raw text -


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