From bcc5cc28c6dc5178e8f4fd0cc521034ae5def388 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:22:18 +0200 Subject: 5.10 --- RealtimeSync/watcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'RealtimeSync/watcher.cpp') diff --git a/RealtimeSync/watcher.cpp b/RealtimeSync/watcher.cpp index bfdb79c2..8ed37ea3 100644 --- a/RealtimeSync/watcher.cpp +++ b/RealtimeSync/watcher.cpp @@ -30,7 +30,7 @@ TickVal lastExec = getTicks(); bool rts::updateUiIsAllowed() { const TickVal now = getTicks(); //0 on error - if (now - lastExec >= TICKS_UPDATE_INTERVAL) //perform ui updates not more often than necessary + if (dist(lastExec, now) >= TICKS_UPDATE_INTERVAL) //perform ui updates not more often than necessary { lastExec = now; return true; @@ -98,7 +98,7 @@ rts::WaitResult rts::waitForChanges(const std::vector& dirNamesNonFmt, const bool checkDirExistNow = [&]() -> bool //checking once per sec should suffice { const TickVal now = getTicks(); //0 on error - if (now - lastCheck >= TICKS_DIR_CHECK_INTERVAL) + if (dist(lastCheck, now) >= TICKS_DIR_CHECK_INTERVAL) { lastCheck = now; return true; -- cgit