apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@ntrnet.net>
Subject RE: Why not POSIX time_t?
Date Mon, 15 Jul 2002 18:53:03 GMT
On Mon, 15 Jul 2002, Bill Stoddard wrote:

> > >>    3. 64-bit shifts to get approximate seconds
> > >>       (fast, but loss of accuracy)
> > >>
> > >>
> > >
> > >If you convert from microseconds to integer seconds (which is what httpd
> > >requires), you loose -resolution- no matter how you do it. If
> > the accuracy
> > >you loose is smaller than the resolution, then what does it
> > matter that you
> > >loose some accuracy?
> > >
> >
> > I think it's possible to see inaccuracies at the second level if
> > we divide the current time_t by 2^20.  If not, then this concern
> > vanishes.
> >
> 
> Cliff demonstrates that there is significant loss of accuracy using just a
> shift. I believe (faith? :-) that there is a simple solution to this. Don't
> know what it is just now though...

I keep thinking that we know what the accuracy difference is, and we know
how many seconds we have, so a simple 32-bit multiplication should be able
to solve this problem.   hmmmmmm.......

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
550 Jean St
Oakland CA 94610
-------------------------------------------------------------------------------


Mime
View raw message