mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-13 04:27:47 -05:00
term: experimental: tweak delay timeouts
Increase the low timeout, to try to give clients/slaves more time to emit data. Decrease the upper timeout. On average, we should have ~½ frame left until the next frame. So a maximum delay of a whole frame *will* delay the update one extra frame in many cases. Hopefully, the low timeout is still low enough that we don't miss the next frame, on average.
This commit is contained in:
parent
b92cc9a7c7
commit
2a95f2949b
1 changed files with 2 additions and 2 deletions
|
|
@ -183,7 +183,7 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
|
|||
/* First timeout - reset each time we receive input. */
|
||||
timerfd_settime(
|
||||
term->delayed_render_timer.lower_fd, 0,
|
||||
&(struct itimerspec){.it_value = {.tv_nsec = 1000000}},
|
||||
&(struct itimerspec){.it_value = {.tv_nsec = 2000000}},
|
||||
NULL);
|
||||
|
||||
/* Second timeout - only reset when we render. Set to one
|
||||
|
|
@ -191,7 +191,7 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
|
|||
if (!term->delayed_render_timer.is_armed) {
|
||||
timerfd_settime(
|
||||
term->delayed_render_timer.upper_fd, 0,
|
||||
&(struct itimerspec){.it_value = {.tv_nsec = 16666666}},
|
||||
&(struct itimerspec){.it_value = {.tv_nsec = 16666666 / 2}},
|
||||
NULL);
|
||||
term->delayed_render_timer.is_armed = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue