From 287698e50fb2340d9f6436976ac701512cb7c383 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Mon, 7 Mar 2022 11:03:59 +0400 Subject: qga: replace qemu_gettimeofday() with g_get_real_time() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GLib g_get_real_time() is an alternative to gettimeofday() which allows to simplify our code. Signed-off-by: Marc-André Lureau Reviewed-by: Laurent Vivier Reviewed-by: Thomas Huth Message-Id: <20220307070401.171986-4-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- qga/commands.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qga/commands.c') diff --git a/qga/commands.c b/qga/commands.c index 72e6022207..4e9ce25b2e 100644 --- a/qga/commands.c +++ b/qga/commands.c @@ -585,3 +585,8 @@ GuestFileRead *qmp_guest_file_read(int64_t handle, bool has_count, return read_data; } + +int64_t qmp_guest_get_time(Error **errp) +{ + return g_get_real_time() * 1000; +} -- cgit 1.4.1