delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/01/08/13:34:57

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Mon, 8 Jan 2007 13:34:43 -0500
Message-Id: <200701081834.l08IYh2U025555@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: Gordon DOT Schumacher AT seagate DOT com
CC: djgpp AT delorie DOT com
In-reply-to:
<OF1B107D53 DOT 1922E890-ON8725725D DOT 005F267B-8725725D DOT 00633021 AT seagate DOT com>
(Gordon DOT Schumacher AT seagate DOT com)
Subject: Re: Performance enhancement for gettimeofday()?
References: <OF1B107D53 DOT 1922E890-ON8725725D DOT 005F267B-8725725D DOT 00633021 AT seagate DOT com>
Errors-To: nobody AT delorie DOT com

> # 18.0265Hz).  clock has the define CLOCK_PER_SEC which is 91.  I'm
> not sure # why that value is used or the period it generates is
> used,

We just scale the 18.2Hz count by 5 so that CLOCKS_PER_SEC is an
integer.

> Looking at the libc source code, the value from the interrupt is
> multiplied by five before being handed off to the user, so that the
> user does not have to use floating-point math.

Yup.

- Raw text -


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