diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2014-05-12 10:28:31 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2014-05-12 10:28:31 (GMT) |
commit | f3e82cae8372c4f4a757e1277a442b5e9056b44f (patch) | |
tree | 9c712335998004096305a25ba066954f01cdf372 | |
parent | 6700eb354fee98492d1b17b927b76749242bf9b9 (diff) | |
download | fluxbox-f3e82cae8372c4f4a757e1277a442b5e9056b44f.zip fluxbox-f3e82cae8372c4f4a757e1277a442b5e9056b44f.tar.bz2 |
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.
-rw-r--r-- | src/FbTk/FbTime.hh | 2 |
1 files changed, 1 insertions, 1 deletions
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 { | |||
47 | // calculates the remaining microseconds from 'now' up to the | 47 | // calculates the remaining microseconds from 'now' up to the |
48 | // next full 'unit' | 48 | // next full 'unit' |
49 | inline uint64_t remainingNext(uint64_t now, uint64_t unit) { | 49 | inline uint64_t remainingNext(uint64_t now, uint64_t unit) { |
50 | return (unit - (now % unit) - 1); | 50 | return (unit - (now % unit)); |
51 | } | 51 | } |
52 | 52 | ||
53 | } // namespace FbTime | 53 | } // namespace FbTime |