From f3e82cae8372c4f4a757e1277a442b5e9056b44f Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Mon, 12 May 2014 12:28:31 +0200 Subject: allow a timeout of a full 'unit' the -1 in the FbTk::FbTimer::remainingNext() function was pointless in the first place anyway: reducing the timeout by just 1 microsecond improves nothing (in this case). if the timer triggers exactly at a full unit (second) then it's correct to wait for the full next unit. --- src/FbTk/FbTime.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FbTk/FbTime.hh b/src/FbTk/FbTime.hh index 42ee912..5726fb7 100644 --- a/src/FbTk/FbTime.hh +++ b/src/FbTk/FbTime.hh @@ -47,7 +47,7 @@ namespace FbTime { // calculates the remaining microseconds from 'now' up to the // next full 'unit' inline uint64_t remainingNext(uint64_t now, uint64_t unit) { - return (unit - (now % unit) - 1); + return (unit - (now % unit)); } } // namespace FbTime -- cgit v0.11.2