bug-gnulib
[Top][All Lists]
Advanced

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

Re: bug#54764: encode-time: make DST and TIMEZONE fields of the list arg


From: Paul Eggert
Subject: Re: bug#54764: encode-time: make DST and TIMEZONE fields of the list argument optional ones
Date: Wed, 20 Apr 2022 17:11:34 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 4/20/22 12:30, Eli Zaretskii wrote:

I see the time samples change in jumps of 15 msec.

Could you give the first part of the output? I would like to see what the the samples are jumping from and to, and how often they jump.

Something like the following is what I'd hope to see from the first lines of the output of 'gllib/test-gettime-res x'. What are you seeing?

gettime_res returned 15625000 ns
time = 1650496481.515625000
time = 1650496481.531250000
time = 1650496481.546875000
time = 1650496481.562500000
time = 1650496481.578125000
time = 1650496481.593750000
time = 1650496481.609375000
time = 1650496481.625000000
time = 1650496481.640625000
time = 1650496481.656250000

 Which is expected
on MS-Windows, given the scheduler time tick, but what does that have
to do with the system's time resolution?

The resolution of Elisp's (time-convert nil t) is determined by the smallest nonzero gap between timestamps that are returned by C's current_timespec. This is the system time resolution as far as Elisp is concerned, because Elisp cannot return the current time at a finer resolution than what current_timespec gives it. This resolution is not necessarily the same as the time resolution of the motherboard clock, OS high-res timestamp, file timestamps, etc.

And how is the 0.625 msec
number reported by the program obtained from those samples?

Use the largest resolution R ns consistent with the samples, such that 1000000000 is an integer multiple of R so that timestamp computations are exact.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]