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.
This commit is contained in:
Mathias Gumz 2014-05-12 12:28:31 +02:00
parent 6700eb354f
commit f3e82cae83

View file

@ -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