aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉrico Nogueira <erico.erc@gmail.com>2022-01-14 14:39:27 +0000
committerÉrico Nogueira <erico.erc@gmail.com>2022-01-14 14:39:27 +0000
commit5af65d897cae7eb7dbbdc7e967f3cd1e67552a96 (patch)
tree26142ce0d5bc43eccea6620dcc7a378343e37c1f
parentdcs: decrqss: refactor: append_sgr_attr_n() is now a proper function (diff)
terminal: use CLOCK_MONOTONIC instead of literal.
CLOCK_MONOTONIC isn't guaranteed to have the same value on all platforms, and this makes the code more readable.
-rw-r--r--terminal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/terminal.c b/terminal.c
index 797bc84d..f985ec54 100644
--- a/terminal.c
+++ b/terminal.c
@@ -290,7 +290,7 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
#if PTMX_TIMING
struct timespec now;
- clock_gettime(1, &now);
+ clock_gettime(CLOCK_MONOTONIC, &now);
if (last.tv_sec > 0 || last.tv_nsec > 0) {
struct timeval diff;
struct timeval l = {last.tv_sec, last.tv_nsec / 1000};