aboutsummaryrefslogtreecommitdiff
path: root/qga/commands.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-03-07 11:03:59 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2022-04-06 10:50:37 +0200
commit287698e50fb2340d9f6436976ac701512cb7c383 (patch)
tree06e5cc5529ee879f76cbf1c6d3154f719188e4cf /qga/commands.c
parent20e4ae117a868c77e3e84147bd1708cdf159f8be (diff)
qga: replace qemu_gettimeofday() with g_get_real_time()
GLib g_get_real_time() is an alternative to gettimeofday() which allows to simplify our code. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220307070401.171986-4-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qga/commands.c')
-rw-r--r--qga/commands.c5
1 files changed, 5 insertions, 0 deletions
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;
+}