|
From: | Paul Eggert |
Subject: | Re: Question about bignum usage |
Date: | Sat, 13 Jul 2024 21:34:36 -0700 |
User-agent: | Mozilla Thunderbird |
On 2024-07-13 02:43, Mattias Engdegård wrote:
time decoding output sometimes depends on the exact form of the input: (time-convert '(0 3) t) => (3 . 1) (time-convert '(0 3 0) t) => (3000000 . 1000000) (time-convert '(0 3 0 0) t) => (3000000000000 . 1000000000000) Does it make sense to distinguish (A B), (A B 0) and (A B 0 0) like this?
Yes, because the input form has the same effective precision as the output form. One would not want (time-convert '(0 3 0 0) t) and (time-convert '(0 3 0 1) t) to generate timestamps with different precisions.
If one knows the input timestamp has a particular resolution regardless of its format, μs for example, one can give that resolution to time-convert, e.g., (time-convert TIMESTAMP 1000000).
[Prev in Thread] | Current Thread | [Next in Thread] |