Skip to content
Myr

main: keyboard repeat: handle multi-second delays

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Daniel Eklöf · committed by Daniel Eklöf · parent e2a415d · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:main.c+2 added-2 removed
141 unmodified lines
142 clock_gettime(CLOCK_REALTIME, &timeout);143144 timeout.tv_nsec += delay;145 if (timeout.tv_nsec >= 1000000000) {146 timeout.tv_sec += 1;147 timeout.tv_nsec -= 1000000000;146 timeout.tv_sec += timeout.tv_nsec / 1000000000;147 timeout.tv_nsec %= 1000000000;148 }149150 cnd_timedwait(&c->repeat.cond, &c->repeat.mutex, &timeout);151
824 unmodified lines