]> git.proxmox.com Git - mirror_qemu.git/commit - cpus.c
Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND
authorRutuja Shah <rutu.shah.26@gmail.com>
Mon, 21 Mar 2016 16:02:30 +0000 (21:32 +0530)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 22 Mar 2016 21:20:17 +0000 (22:20 +0100)
commit73bcb24d932912f8e75e1d88da0fc0ac6d4bce78
tree50ca9c81024707f16dfc7cfe60b1e52c1dd0b9c2
parent4771d756f46219762477aaeaaef9bd215e3d5c60
Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND

This patch replaces get_ticks_per_sec() calls with the macro
NANOSECONDS_PER_SECOND. Also, as there are no callers, get_ticks_per_sec()
is then removed.  This replacement improves the readability and
understandability of code.

For example,

    timer_mod(fdctrl->result_timer,
      qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + (get_ticks_per_sec() / 50));

NANOSECONDS_PER_SECOND makes it obvious that qemu_clock_get_ns
matches the unit of the expression on the right side of the plus.

Signed-off-by: Rutuja Shah <rutu.shah.26@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
53 files changed:
audio/audio.c
audio/noaudio.c
audio/spiceaudio.c
audio/wavaudio.c
backends/baum.c
block/qed.c
cpus.c
hw/acpi/core.c
hw/arm/omap1.c
hw/arm/spitz.c
hw/arm/stellaris.c
hw/arm/strongarm.c
hw/audio/adlib.c
hw/audio/sb16.c
hw/block/fdc.c
hw/block/pflash_cfi02.c
hw/bt/hci-csr.c
hw/char/cadence_uart.c
hw/char/serial.c
hw/display/vga.c
hw/dma/rc4030.c
hw/ide/core.c
hw/input/hid.c
hw/input/tsc2005.c
hw/input/tsc210x.c
hw/intc/i8259.c
hw/misc/arm_sysctl.c
hw/misc/macio/cuda.c
hw/misc/macio/macio.c
hw/net/dp8393x.c
hw/ppc/ppc.c
hw/ppc/ppc405_uc.c
hw/ppc/ppc_booke.c
hw/sd/sdhci-internal.h
hw/sparc64/sun4u.c
hw/timer/i8254.c
hw/timer/i8254_common.c
hw/timer/mc146818rtc.c
hw/timer/omap_gptimer.c
hw/timer/omap_synctimer.c
hw/timer/pl031.c
hw/timer/pxa2xx_timer.c
hw/usb/hcd-ehci.c
hw/usb/hcd-musb.c
hw/usb/hcd-ohci.c
hw/usb/hcd-uhci.c
hw/usb/tusb6010.c
hw/watchdog/wdt_diag288.c
hw/watchdog/wdt_ib700.c
include/hw/acpi/acpi.h
include/qemu/timer.h
monitor.c
target-ppc/kvm.c