diff --git a/libs/main/thread/pitimer.cpp b/libs/main/thread/pitimer.cpp index bd2758f6..f0de29f4 100644 --- a/libs/main/thread/pitimer.cpp +++ b/libs/main/thread/pitimer.cpp @@ -325,7 +325,7 @@ bool _PITimerImp_Thread::threadFunc() { } if (wait_tick > 0) { if (st_wait.toMilliseconds() > wait_tick + 1.) { - piMSleep(wait_tick); + event.sleep(wait_tick * 1000); if (thread_.isStopping()) return false; return false; } else { diff --git a/main.cpp b/main.cpp index 5ace916b..56fda705 100644 --- a/main.cpp +++ b/main.cpp @@ -96,7 +96,7 @@ int main(int argc, char * argv[]) { }); timer.start(500); - piSleep(1.12); + piSleep(2.12); piCout << "end"; PITimeMeasurer tm; timer.stop();