From 45717c61bab9509b2b41b4bc942f54818f11358a Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sat, 21 Jan 2017 14:53:33 +0800 Subject: [PATCH] cleanup qemu/util/qemu-timer-common.c --- qemu/include/qemu/timer.h | 2 -- qemu/util/qemu-timer-common.c | 17 ----------------- 2 files changed, 19 deletions(-) diff --git a/qemu/include/qemu/timer.h b/qemu/include/qemu/timer.h index 6772165b..644a5bc0 100644 --- a/qemu/include/qemu/timer.h +++ b/qemu/include/qemu/timer.h @@ -181,8 +181,6 @@ static inline int64_t get_clock(void) #else -extern int use_rt_clock; - static inline int64_t get_clock(void) { return get_clock_realtime(); diff --git a/qemu/util/qemu-timer-common.c b/qemu/util/qemu-timer-common.c index 95e0847c..9c83bcf2 100644 --- a/qemu/util/qemu-timer-common.c +++ b/qemu/util/qemu-timer-common.c @@ -41,21 +41,4 @@ static void __attribute__((constructor)) init_get_clock(void) } clock_freq = freq.QuadPart; } - -#else - -int use_rt_clock; - -static void __attribute__((constructor)) init_get_clock(void) -{ - use_rt_clock = 0; -#ifdef CLOCK_MONOTONIC - { - struct timespec ts; - if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) { - use_rt_clock = 1; - } - } -#endif -} #endif