mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
Make get_ticks_per_sec() a static inline
ticks_per_sec is a constant. There's no need to store it as a variable as it never changes since our time is based on units. Convert get_ticks_per_sec() to a static inline and move the constant into qemu-timer.h. Remove all references to QEMU_TIMER_BASE so that we consistently use this interface. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
@@ -26,7 +26,10 @@ void qemu_mod_timer(QEMUTimer *ts, int64_t expire_time);
|
||||
int qemu_timer_pending(QEMUTimer *ts);
|
||||
int qemu_timer_expired(QEMUTimer *timer_head, int64_t current_time);
|
||||
|
||||
int64_t get_ticks_per_sec(void);
|
||||
static inline int64_t get_ticks_per_sec(void)
|
||||
{
|
||||
return 1000000000LL;
|
||||
}
|
||||
|
||||
void qemu_get_timer(QEMUFile *f, QEMUTimer *ts);
|
||||
void qemu_put_timer(QEMUFile *f, QEMUTimer *ts);
|
||||
|
||||
Reference in New Issue
Block a user