From c57c846a80f9306aa2c6cf7efdef45ed42723fac Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sat, 23 Oct 2010 15:24:07 +0000 Subject: qemu-timer: move commonly used timer code to qemu-timer-common Move timer init functions to a new file, qemu-timer-common.c. Make other critical timer functions inlined to preserve performance in qemu-timer.c, also move muldiv64() (used by the inline functions) to qemu-timer.h. Adjust block/raw-posix.c and simpletrace.c to use get_clock() directly. Remove a similar/duplicate definition in qemu-tool.c. Adjust hw/omap_clk.c to include qemu-timer.h because muldiv64() is used there. After this change, tracing can be used also for user code and simpletrace on Win32. Cc: Stefan Hajnoczi Acked-by: Stefan Hajnoczi Signed-off-by: Blue Swirl --- qemu-tool.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'qemu-tool.c') diff --git a/qemu-tool.c b/qemu-tool.c index b39af86e01..9ccca655ef 100644 --- a/qemu-tool.c +++ b/qemu-tool.c @@ -110,10 +110,3 @@ int qemu_set_fd_handler2(int fd, { return 0; } - -int64_t qemu_get_clock(QEMUClock *clock) -{ - qemu_timeval tv; - qemu_gettimeofday(&tv); - return (tv.tv_sec * 1000000000LL + (tv.tv_usec * 1000)) / 1000000; -} -- cgit v1.2.3-55-g7522