s/CLOCK_MONOTONIC_RAW/CLOCK_MONOTONIC/g

This commit is contained in:
nick black 2020-03-11 05:43:34 -04:00
parent de520f3aa0
commit d77aa78a0e
3 changed files with 3 additions and 8 deletions

View File

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

View File

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

View File

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