Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2020-06-02 11:29:48 +01:00
7 changed files with 223 additions and 178 deletions

14
tmux.c
View File

@ -237,6 +237,20 @@ setblocking(int fd, int state)
}
}
uint64_t
get_timer(void)
{
struct timespec ts;
/*
* We want a timestamp in milliseconds suitable for time measurement,
* so prefer the monotonic clock.
*/
if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0)
clock_gettime(CLOCK_REALTIME, &ts);
return ((ts.tv_sec * 1000ULL) + (ts.tv_nsec / 1000000ULL));
}
const char *
sig2name(int signo)
{