aboutsummaryrefslogtreecommitdiff
path: root/qga/commands-posix.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-posix.c
parent20e4ae117a868c77e3e84147bd1708cdf159f8be (diff)
downloadqemu-287698e50fb2340d9f6436976ac701512cb7c383.zip
qemu-287698e50fb2340d9f6436976ac701512cb7c383.tar.gz
qemu-287698e50fb2340d9f6436976ac701512cb7c383.tar.bz2
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-posix.c')
-rw-r--r--qga/commands-posix.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 75dbaab..1e7b465 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -136,20 +136,6 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
/* succeeded */
}
-int64_t qmp_guest_get_time(Error **errp)
-{
- int ret;
- qemu_timeval tq;
-
- ret = qemu_gettimeofday(&tq);
- if (ret < 0) {
- error_setg_errno(errp, errno, "Failed to get time");
- return -1;
- }
-
- return tq.tv_sec * 1000000000LL + tq.tv_usec * 1000;
-}
-
void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
{
int ret;