X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=qemu%2Fhw%2Finput%2Ftsc2005.c;h=9b359aaec0a58e694516a763d908255a22f09cd2;hb=refs%2Fchanges%2F03%2F14303%2F1;hp=21d4f4dbbd2a0433dafe5db56a2879f7c85233b2;hpb=5bbd6fe9b8bab2a93e548c5a53b032d1939eec05;p=kvmfornfv.git diff --git a/qemu/hw/input/tsc2005.c b/qemu/hw/input/tsc2005.c index 21d4f4dbb..9b359aaec 100644 --- a/qemu/hw/input/tsc2005.c +++ b/qemu/hw/input/tsc2005.c @@ -18,6 +18,7 @@ * with this program; if not, see . */ +#include "qemu/osdep.h" #include "hw/hw.h" #include "qemu/timer.h" #include "ui/console.h" @@ -290,7 +291,8 @@ static void tsc2005_pin_update(TSC2005State *s) s->precision = s->nextprecision; s->function = s->nextfunction; s->pdst = !s->pnd0; /* Synchronised on internal clock */ - expires = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + (get_ticks_per_sec() >> 7); + expires = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + + (NANOSECONDS_PER_SECOND >> 7); timer_mod(s->timer, expires); }