diff options
-rw-r--r-- | aclocal.m4 | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 226e15aec5..33a51badbb 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1654,7 +1654,7 @@ then then # We can't test timer_create when we're cross-compiling, so we # optimistiaclly assume that it actually works properly. - AC_DEFINE([USE_TIMER_CREATE], 1, [Define to 1 if we can use timer_create(CLOCK_PROCESS_CPUTIME_ID,...)]) + AC_DEFINE([USE_TIMER_CREATE], 1, [Define to 1 if we can use timer_create(CLOCK_REALTIME,...)]) else AC_CACHE_CHECK([for a working timer_create(CLOCK_REALTIME)], [fptools_cv_timer_create_works], @@ -1715,36 +1715,6 @@ int main(int argc, char *argv[]) } alarm(1); - if (timer_create(CLOCK_PROCESS_CPUTIME_ID, &ev, &timer) != 0) { - fprintf(stderr,"No CLOCK_PROCESS_CPUTIME_ID timer\n"); - exit(1); - } - - it.it_value.tv_sec = 0; - it.it_value.tv_nsec = 1; - it.it_interval = it.it_value; - if (timer_settime(timer, 0, &it, NULL) != 0) { - fprintf(stderr,"settime problem\n"); - exit(4); - } - - tock = 0; - - for(n = 3; n < 20000; n++){ - for(m = 2; m <= n/2; m++){ - if (!(n%m)) count++; - if (tock) goto out; - } - } -out: - - if (!tock) { - fprintf(stderr,"no CLOCK_PROCESS_CPUTIME_ID signal\n"); - exit(5); - } - - timer_delete(timer); - if (timer_create(CLOCK_REALTIME, &ev, &timer) != 0) { fprintf(stderr,"No CLOCK_REALTIME timer\n"); exit(2); @@ -1777,7 +1747,7 @@ out: ]) case $fptools_cv_timer_create_works in yes) AC_DEFINE([USE_TIMER_CREATE], 1, - [Define to 1 if we can use timer_create(CLOCK_PROCESS_CPUTIME_ID,...)]);; + [Define to 1 if we can use timer_create(CLOCK_REALTIME,...)]);; esac fi fi |