[libvirt] [PATCHv2 0/4] Time setting and getting in qemu guests

Eric Blake eblake at redhat.com
Wed Apr 2 11:44:16 UTC 2014


On 04/02/2014 03:34 AM, Michal Privoznik wrote:
> If we'd come up with a struct to interpret the time, it's written
> in stone and there's nothing we can do about it. Even if we break
> up the struct into function arguments. However, we can use typed
> parameters and have the API extensible. For example, I'm
> implementing seconds granularity only for now. If later somebody
> feels like he/she wants to use even finer granularity, we can do
> that by inventing a new typed param. Same goes for timezone, etc.

But what more is there to add besides seconds and nanoseconds (struct
timespec)?  We don't have to support full resolution of nanoseconds, and
could either document that we round (possibly to as course as seconds)
or reject input with non-zero nanoseconds if we don't want to support
sub-seconds right away.  It just feels awkward to me to have to bundle
something into a virTypedParam when the most we could ever extend this
to is struct timespec, so representing struct timespec via split
parameters from the get-go requires less thought when using the interface.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140402/58b1b9cf/attachment-0001.sig>


More information about the libvir-list mailing list