From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoCe8-0001R1-R9 for qemu-devel@nongnu.org; Fri, 20 Jan 2012 06:28:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoCe7-0002x9-KR for qemu-devel@nongnu.org; Fri, 20 Jan 2012 06:28:40 -0500 Received: from mail-wi0-f173.google.com ([209.85.212.173]:53358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoCe7-0002x2-Bl for qemu-devel@nongnu.org; Fri, 20 Jan 2012 06:28:39 -0500 Received: by wibhm11 with SMTP id hm11so388693wib.4 for ; Fri, 20 Jan 2012 03:28:38 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 20 Jan 2012 12:28:33 +0100 Message-Id: <1327058913-7934-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <4F194F4E.9060901@redhat.com> References: <4F194F4E.9060901@redhat.com> Subject: [Qemu-devel] [PATCH v2] rename get_clock_realtime List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jan Kiszka get_clock_realtime accesses the host_clock, not the rt_clock. Signed-off-by: Paolo Bonzini --- v1->v2: remove incorrect comment qemu-timer.c | 2 +- qemu-timer.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index cd026c6..4a14a6d 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -436,7 +436,7 @@ int64_t qemu_get_clock_ns(QEMUClock *clock) return cpu_get_clock(); } case QEMU_CLOCK_HOST: - now = get_clock_realtime(); + now = get_clock_host(); last = clock->last; clock->last = now; if (now < last) { diff --git a/qemu-timer.h b/qemu-timer.h index de17f3b..a61f209 100644 --- a/qemu-timer.h +++ b/qemu-timer.h @@ -92,8 +92,7 @@ static inline int64_t get_ticks_per_sec(void) return 1000000000LL; } -/* real time host monotonic timer */ -static inline int64_t get_clock_realtime(void) +static inline int64_t get_clock_host(void) { struct timeval tv; @@ -131,7 +130,7 @@ static inline int64_t get_clock(void) { /* XXX: using gettimeofday leads to problems if the date changes, so it should be avoided. */ - return get_clock_realtime(); + return get_clock_host(); } } #endif -- 1.7.7.1