]> git.proxmox.com Git - mirror_qemu.git/blobdiff - tests/atomic_add-bench.c
i386: Update new x86_apicid parsing rules with die_offset support
[mirror_qemu.git] / tests / atomic_add-bench.c
index 2f6c72f63a3cac445d5bed53f50c1433e4cf710f..5666f6bbffbbfc8b7302fdd009a852cf042890b5 100644 (file)
@@ -76,16 +76,14 @@ static void *thread_func(void *arg)
 
 static void run_test(void)
 {
-    unsigned int remaining;
     unsigned int i;
 
     while (atomic_read(&n_ready_threads) != n_threads) {
         cpu_relax();
     }
+
     atomic_set(&test_start, true);
-    do {
-        remaining = sleep(duration);
-    } while (remaining);
+    g_usleep(duration * G_USEC_PER_SEC);
     atomic_set(&test_stop, true);
 
     for (i = 0; i < n_threads; i++) {