osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] PEP 410 (Decimal timestamp): the implementation is ready for a review


On Wed, Feb 15, 2012 at 6:06 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> On 16/02/12 06:43, Guido van Rossum wrote:
>>
>> This does not explain why microseconds aren't good enough. It seems
>> none of the clocks involved can actually measure even relative time
>> intervals more accurate than 100ns, and I expect that kernels don't
>> actually keep their clock more accurate than milliseconds.
>
>
> I gather that modern x86 CPUs have a counter that keeps track of
> time down to a nanosecond or so by counting clock cycles. In
> principle it seems like a kernel should be able to make use of
> it in conjunction with other timekeeping hardware to produce
> nanosecond-resolution timestamps.
>
> Whether any existing kernel actually does that is another
> matter. It probably isn't worth the bother for things like
> file timestamps, where the time taken to execute the system
> call that modifies the file is likely to be several orders
> of magnitude larger.

Ironically, file timestamps are likely the only place where it
matters. Read the rest of the thread.


-- 
--Guido van Rossum (python.org/~guido)