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: Eric Blake
Subject: Re: [PATCH v13 01/12] util/cutils: Add qemu_strtotime_ps()
Date: Tue, 22 Oct 2019 20:13:35 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

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.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

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