diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-03-11 16:47:48 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2011-03-21 09:23:23 +0100 |
commit | 74475455442398a64355428b37422d14ccc293cb (patch) | |
tree | 2cd6fea3fef5aeca9c2a73ea568ed49fd2b51de1 /hw/m48t59.c | |
parent | 7bd427d801e1e3293a634d3c83beadaa90ffb911 (diff) |
change all other clock references to use nanosecond resolution accessors
This was done with:
sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
$(git grep -l 'qemu_get_clock\>' )
sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
$(git grep -l 'qemu_new_timer\>' )
after checking that get_clock and new_timer never occur twice
on the same line. There were no missed occurrences; however, even
if there had been, they would have been caught by the compiler.
There was exactly one false positive in qemu_run_timers:
- current_time = qemu_get_clock (clock);
+ current_time = qemu_get_clock_ns (clock);
which is of course not in this patch.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/m48t59.c')
-rw-r--r-- | hw/m48t59.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/m48t59.c b/hw/m48t59.c index 2020487bbe..9f39d6bbf0 100644 --- a/hw/m48t59.c +++ b/hw/m48t59.c @@ -123,7 +123,7 @@ static void alarm_cb (void *opaque) /* Repeat once a second */ next_time = 1; } - qemu_mod_timer(NVRAM->alrm_timer, qemu_get_clock(vm_clock) + + qemu_mod_timer(NVRAM->alrm_timer, qemu_get_clock_ns(vm_clock) + next_time * 1000); qemu_set_irq(NVRAM->IRQ, 0); } @@ -691,8 +691,8 @@ static void m48t59_init_common(M48t59State *s) { s->buffer = qemu_mallocz(s->size); if (s->type == 59) { - s->alrm_timer = qemu_new_timer(vm_clock, &alarm_cb, s); - s->wd_timer = qemu_new_timer(vm_clock, &watchdog_cb, s); + s->alrm_timer = qemu_new_timer_ns(vm_clock, &alarm_cb, s); + s->wd_timer = qemu_new_timer_ns(vm_clock, &watchdog_cb, s); } qemu_get_timedate(&s->alarm, 0); |