diff options
Diffstat (limited to 'android')
-rw-r--r-- | android/hw-sensors.c | 4 | ||||
-rw-r--r-- | android/looper-qemu.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/android/hw-sensors.c b/android/hw-sensors.c index c3ab12f..69447a2 100644 --- a/android/hw-sensors.c +++ b/android/hw-sensors.c @@ -212,7 +212,7 @@ _hwSensorClient_new( HwSensors* sensors ) cl->sensors = sensors; cl->enabledMask = 0; cl->delay_ms = 800; - cl->timer = qemu_new_timer(vm_clock, _hwSensorClient_tick, cl); + cl->timer = qemu_new_timer_ns(vm_clock, _hwSensorClient_tick, cl); cl->next = sensors->clients; sensors->clients = cl; @@ -316,7 +316,7 @@ _hwSensorClient_tick( void* opaque ) _hwSensorClient_send(cl, (uint8_t*) buffer, strlen(buffer)); } - now_ns = qemu_get_clock(vm_clock); + now_ns = qemu_get_clock_ns(vm_clock); snprintf(buffer, sizeof buffer, "sync:%lld", now_ns/1000); _hwSensorClient_send(cl, (uint8_t*)buffer, strlen(buffer)); diff --git a/android/looper-qemu.c b/android/looper-qemu.c index 5526f5b..714b48d 100644 --- a/android/looper-qemu.c +++ b/android/looper-qemu.c @@ -36,7 +36,7 @@ qlooptimer_startRelative(void* impl, Duration timeout_ms) if (timeout_ms == DURATION_INFINITE) qemu_del_timer(tt); else - qemu_mod_timer(tt, qemu_get_clock_ns(host_clock) + timeout_ms*1000000); + qemu_mod_timer(tt, qemu_get_clock_ms(host_clock) + timeout_ms); } static void @@ -85,7 +85,7 @@ qlooper_timer_init(Looper* looper, void* opaque) { timer->clazz = (LoopTimerClass*) &qlooptimer_class; - timer->impl = qemu_new_timer(host_clock, callback, opaque); + timer->impl = qemu_new_timer_ms(host_clock, callback, opaque); } /********************************************************************** @@ -370,7 +370,7 @@ qlooper_handle_io_bh(void* opaque) static Duration qlooper_now(Looper* ll) { - return qemu_get_clock_ns(host_clock)/1000000; + return qemu_get_clock_ms(host_clock); } extern void qemu_system_shutdown_request(void); |