diff --git a/vendored/libfuse/include/thread_pool.hpp b/vendored/libfuse/include/thread_pool.hpp index 218aa37f..559ff8e1 100644 --- a/vendored/libfuse/include/thread_pool.hpp +++ b/vendored/libfuse/include/thread_pool.hpp @@ -481,9 +481,14 @@ ThreadPool::monitor_routine(void *arg_) constexpr int decline_threshold = 2; int warmup_samples = 0; + const struct timespec sleep_ts = { + static_cast(interval / 1000000), + static_cast((interval % 1000000) * 1000) + }; + while(!btp->_stop.load(std::memory_order_acquire)) { - usleep(interval); + nanosleep(&sleep_ts,NULL); if(btp->_stop.load(std::memory_order_acquire)) break;