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:
parent
6700eb354f
commit
f3e82cae83
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ namespace FbTime {
|
||||||
// calculates the remaining microseconds from 'now' up to the
|
// calculates the remaining microseconds from 'now' up to the
|
||||||
// next full 'unit'
|
// next full 'unit'
|
||||||
inline uint64_t remainingNext(uint64_t now, uint64_t unit) {
|
inline uint64_t remainingNext(uint64_t now, uint64_t unit) {
|
||||||
return (unit - (now % unit) - 1);
|
return (unit - (now % unit));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace FbTime
|
} // namespace FbTime
|
||||||
|
|
Loading…
Reference in a new issue