From e536f16e1ffc6b1e5ce6ac52657a0881d92a427d Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Mon, 7 Mar 2022 11:04:01 +0400 Subject: oslib: drop qemu_gettimeofday() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No longer used after the previous patches. Signed-off-by: Marc-André Lureau Reviewed-by: Laurent Vivier Reviewed-by: Stefan Weil Reviewed-by: Richard Henderson Message-Id: <20220307070401.171986-6-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- util/oslib-win32.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'util/oslib-win32.c') diff --git a/util/oslib-win32.c b/util/oslib-win32.c index 4b1ce0be4b..f139c069ae 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -230,26 +230,6 @@ void qemu_set_cloexec(int fd) { } -/* Offset between 1/1/1601 and 1/1/1970 in 100 nanosec units */ -#define _W32_FT_OFFSET (116444736000000000ULL) - -int qemu_gettimeofday(qemu_timeval *tp) -{ - union { - unsigned long long ns100; /*time since 1 Jan 1601 in 100ns units */ - FILETIME ft; - } _now; - - if(tp) { - GetSystemTimeAsFileTime (&_now.ft); - tp->tv_usec=(long)((_now.ns100 / 10ULL) % 1000000ULL ); - tp->tv_sec= (long)((_now.ns100 - _W32_FT_OFFSET) / 10000000ULL); - } - /* Always return 0 as per Open Group Base Specifications Issue 6. - Do not set errno on error. */ - return 0; -} - int qemu_get_thread_id(void) { return GetCurrentThreadId(); -- cgit 1.4.1