qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: [Qemu-devel] [PATCH] rename get_clock_realtime
Date: Fri, 20 Jan 2012 12:05:21 +0100	[thread overview]
Message-ID: <1327057522-6590-1-git-send-email-pbonzini@redhat.com> (raw)

get_clock_realtime accesses the host_clock, not the rt_clock.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qemu-timer.c |    2 +-
 qemu-timer.h |    4 ++--
 2 files changed, 3 insertions(+), 3 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..b180fca 100644
--- a/qemu-timer.h
+++ b/qemu-timer.h
@@ -93,7 +93,7 @@ static inline int64_t get_ticks_per_sec(void)
 }
 
 /* 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 +131,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

             reply	other threads:[~2012-01-20 11:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-20 11:05 Paolo Bonzini [this message]
2012-01-20 11:17 ` [Qemu-devel] [PATCH] rename get_clock_realtime Jan Kiszka
2012-01-20 11:26   ` Paolo Bonzini
2012-01-20 11:28     ` [Qemu-devel] [PATCH v2] " Paolo Bonzini
2012-01-20 11:29     ` [Qemu-devel] [PATCH] " Jan Kiszka
2012-01-20 11:39       ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1327057522-6590-1-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).