lkml.org 
[lkml]   [1998]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ARMS WAVING!!! Proposal to fix /proc dainbrammage.

... snip /proc discussion referring to uptime contents ...

LT>the accuracy arbitrary. It's printed out in a format that is meant to be
LT>scannable by "%f", so if you want to make it contain a few hundred
LT>significant digits then you could..

I agree, this is a sane method to implement accuracy. However, the value in
uptime has a decimal precision of 2 digits, which is only 1
one-hundreth of a second. Hmm, a nanosecond is 1 one-billionth of a second..
which equates to 10-9, or a fp precision of 8 digits (not 2).

LT>
LT>Always having microsecond resolution is a bad idea. Because something is
LT>bound to come along that wants nanoseconds. So if you just basically say
LT>that any fractional amount should always be printed out as a floating
LT>point number, then you're fine.
LT>

Of course, even a fp precision of 2 is more than enough for /proc/uptime,
something that probably doesn't *really* matter beyond the nearest second
anyway (or is there soemthing out there that actually uses the fractional
part? I'm interested in seeing it.. )

----------------------------------------------------------
---- ely --- Software/System Engineer ------
------------ <plexus@ionet.net> ------
----------------------------------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [from the cache]
©2003-2011 Jasper Spaans