aboutsummaryrefslogtreecommitdiffstats
path: root/macpoll.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-06-16 17:40:18 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-06-16 17:40:18 -0700
commit256d7c17e9269f82a8f006dc50308d7934b93ce3 (patch)
treee468967895857a03e74b0ff5c35b7d8d2cee19d1 /macpoll.c
parent30276a47a0c454691c586bdc88dea87c2e82c19a (diff)
downloadpw-256d7c17e9269f82a8f006dc50308d7934b93ce3.tar.gz
pw-256d7c17e9269f82a8f006dc50308d7934b93ce3.tar.bz2
pw-256d7c17e9269f82a8f006dc50308d7934b93ce3.zip
bugfix: hokey long interval calculation.
The intent is to have a clock which measures milliseconds and wraps around from 1000000000 (billion) back to zero, fitting into 32 bits. The now - lastttime calculation must be done modulo a billion. The difference could be negative because of the wrap; to ensure we get a positive residue, we add a billion.
Diffstat (limited to 'macpoll.c')
0 files changed, 0 insertions, 0 deletions