qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v13 01/12] util/cutils: Add qemu_strtotime_ps()


From: Tao Xu
Subject: Re: [PATCH v13 01/12] util/cutils: Add qemu_strtotime_ps()
Date: Wed, 23 Oct 2019 09:50:44 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 10/23/2019 9:13 AM, Eric Blake wrote:
On 10/20/19 6:11 AM, Tao Xu wrote:
To convert strings with time suffixes to numbers, support time unit are
"ps" for picosecond, "ns" for nanosecond, "us" for microsecond, "ms"
for millisecond or "s" for second.

I haven't yet reviewed the patch itself, but my off-hand observation:

picosecond is probably too narrow to ever be useful.  POSIX interfaces
only go down to nanoseconds, and when you start adding in vmexit delay
times and such, we're lucky when we get anything better than microsecond
accuracies.  Supporting just three sub-second suffixes instead of four
would slightly simplify the code, and not cost you any real precision.

Thank you for your suggestion.



reply via email to

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