mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
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.
This commit is contained in:
parent
b292e735bb
commit
5af65d897c
1 changed files with 1 additions and 1 deletions
|
|
@ -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};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue