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:
Daniel Eklöf 2019-12-21 00:12:00 +01:00
parent b92cc9a7c7
commit 2a95f2949b
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

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