]> git.ipfire.org Git - thirdparty/qemu.git/commit
qga: use fixed-length and GDateTime for log timestamp
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 7 Apr 2022 11:21:41 +0000 (15:21 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 21 Apr 2022 13:37:16 +0000 (17:37 +0400)
commit55fa0170721e827c1701db3a66a54d44b5660d53
tree16e06b312b5500fa670e17901702205d225bc0ce
parentd30c08dfe42ba3e3521e17cc41ea320366264a11
qga: use fixed-length and GDateTime for log timestamp

The old code is kind of wrong. Say it's 1649309843.000001 seconds past
the epoch. Prints "1649309843.1". 9us later, it prints "1649309843.10".
Should really use %06lu for the microseconds part.

Use GDateTime instead, as suggested by Daniel.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
qga/main.c