summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorRutuja Shah <rutu.shah.26@gmail.com>2016-03-21 21:32:30 +0530
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:52:22 -0600
commit89492b974896cf041e346da9ca03cfb5b94423e0 (patch)
treedc9c94e55c16afa1ab67620faf778c353b28219b /monitor.c
parent69fea71f6bf8a4966c4dc7d0a05a0c85671098f3 (diff)
downloadhqemu-89492b974896cf041e346da9ca03cfb5b94423e0.zip
hqemu-89492b974896cf041e346da9ca03cfb5b94423e0.tar.gz
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>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/monitor.c b/monitor.c
index 4c02f0f..3533602 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1523,9 +1523,9 @@ int64_t dev_time;
static void hmp_info_profile(Monitor *mon, const QDict *qdict)
{
monitor_printf(mon, "async time %" PRId64 " (%0.3f)\n",
- dev_time, dev_time / (double)get_ticks_per_sec());
+ dev_time, dev_time / (double)NANOSECONDS_PER_SECOND);
monitor_printf(mon, "qemu time %" PRId64 " (%0.3f)\n",
- tcg_time, tcg_time / (double)get_ticks_per_sec());
+ tcg_time, tcg_time / (double)NANOSECONDS_PER_SECOND);
tcg_time = 0;
dev_time = 0;
}
OpenPOWER on IntegriCloud