diff --git a/src_main/thread/pitimer.cpp b/src_main/thread/pitimer.cpp index 40a7040f..0611649f 100755 --- a/src_main/thread/pitimer.cpp +++ b/src_main/thread/pitimer.cpp @@ -204,11 +204,15 @@ bool _PITimerImp_Thread::startTimer(double interval_ms) { bool _PITimerImp_Thread::stopTimer(bool wait) { +#ifndef FREERTOS + thread_.stop(true); +#else thread_.stop(); if (wait) if (!thread_.waitForFinish(10)) if (thread_.isRunning()) thread_.terminate(); +#endif return true; }