diff --git a/bin/osxmain.cpp b/bin/osxmain.cpp
index 20da7b882579dadd8d4a0051937045bbb38a0f73..8a23a684346da6bde913a4ecc22d7ce491ec2e7e 100644
--- a/bin/osxmain.cpp
+++ b/bin/osxmain.cpp
@@ -25,6 +25,7 @@
 #include <signal.h>
 #include <getopt.h>
 #include <string>
+#include <chrono>
 
 #include "dring.h"
 #include "callmanager_interface.h"
@@ -161,7 +162,7 @@ osxTests()
 
     while (true) {
         DRing::pollEvents();
-        sleep(1);
+        std::this_thread::sleep_for(std::chrono::milliseconds(10));
     }
 
     DRing::fini();