mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
s/CLOCK_MONOTONIC_RAW/CLOCK_MONOTONIC/g
This commit is contained in:
parent
de520f3aa0
commit
d77aa78a0e
@ -431,7 +431,7 @@ int main(int argc, char** argv){
|
||||
}
|
||||
}
|
||||
struct timespec starttime;
|
||||
clock_gettime(CLOCK_MONOTONIC_RAW, &starttime);
|
||||
clock_gettime(CLOCK_MONOTONIC, &starttime);
|
||||
struct notcurses* nc;
|
||||
if((nc = notcurses_init(&nopts, stdout)) == NULL){
|
||||
return EXIT_FAILURE;
|
||||
|
@ -146,7 +146,7 @@ ncplane_fadein_internal(ncplane* n, const struct timespec* ts,
|
||||
sleepspec.tv_nsec = nextwake % NANOSECS_IN_SEC;
|
||||
int r;
|
||||
// clock_nanosleep() has no love for CLOCK_MONOTONIC_RAW, at least as
|
||||
// of Glibc 2.29 + Linux 5.3 :/.
|
||||
// of Glibc 2.29 + Linux 5.3 (or FreeBSD 12) :/.
|
||||
r = clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &sleepspec, NULL);
|
||||
if(r){
|
||||
break;
|
||||
@ -242,7 +242,7 @@ int ncplane_fadeout(ncplane* n, const struct timespec* ts, fadecb fader, void* c
|
||||
sleepspec.tv_nsec = nextwake % NANOSECS_IN_SEC;
|
||||
int rsleep;
|
||||
// clock_nanosleep() has no love for CLOCK_MONOTONIC_RAW, at least as
|
||||
// of Glibc 2.29 + Linux 5.3 :/.
|
||||
// of Glibc 2.29 + Linux 5.3 (or FreeBSD 12) :/.
|
||||
rsleep = clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &sleepspec, NULL);
|
||||
if(rsleep){
|
||||
break;
|
||||
|
@ -576,11 +576,6 @@ cell_duplicate_far(egcpool* tpool, cell* targ, const ncplane* splane, const cell
|
||||
return ulen;
|
||||
}
|
||||
|
||||
// no CLOCK_MONOTONIC_RAW on FreeBSD as of 12.0 :/
|
||||
#ifndef CLOCK_MONOTONIC_RAW
|
||||
#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user