Revision 6ee093c9 hw/pl031.c

b/hw/pl031.c
67 67
{
68 68
    /* This assumes qemu_get_clock returns the time since the machine was
69 69
       created.  */
70
    return s->tick_offset + qemu_get_clock(vm_clock) / ticks_per_sec;
70
    return s->tick_offset + qemu_get_clock(vm_clock) / get_ticks_per_sec();
71 71
}
72 72

  
73 73
static void pl031_set_alarm(pl031_state *s)
......
76 76
    uint32_t ticks;
77 77

  
78 78
    now = qemu_get_clock(vm_clock);
79
    ticks = s->tick_offset + now / ticks_per_sec;
79
    ticks = s->tick_offset + now / get_ticks_per_sec();
80 80

  
81 81
    /* The timer wraps around.  This subtraction also wraps in the same way,
82 82
       and gives correct results when alarm < now_ticks.  */
......
86 86
        qemu_del_timer(s->timer);
87 87
        pl031_interrupt(s);
88 88
    } else {
89
        qemu_mod_timer(s->timer, now + (int64_t)ticks * ticks_per_sec);
89
        qemu_mod_timer(s->timer, now + (int64_t)ticks * get_ticks_per_sec());
90 90
    }
91 91
}
92 92

  

Also available in: Unified diff