blob: 6de47db9eaf9b575605fbc001a07e946d31435d7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
Index: qemu/vl.c
@@ -662,6 +662,14 @@
case QEMU_TIMER_REALTIME:
#ifdef _WIN32
return GetTickCount();
+#elif defined(_BSD)
+ {
+ struct timeval r;
+ if (!gettimeofday(&r, NULL)) {
+ return ((timer_freq * 1000LL) * (int64_t)r.tv_sec
+ + ((int64_t)r.tv_usec * timer_freq) / 1000) / timer_freq;
+ }
+ }
#else
{
struct tms tp;
|