diff --git a/src/configure.in b/src/configure.in index 870aa40edade52ab422b8b7b1d4d2d491ab99ec6..422689804bbf630941c14914d63f63ca734463f2 100644 --- a/src/configure.in +++ b/src/configure.in @@ -4524,7 +4524,6 @@ fi AC_CHECK_FUNCS( \ _crypt \ poll \ - clock \ closefrom \ crypt \ fdwalk \ diff --git a/src/rusage.c b/src/rusage.c index c06958910f5d6199b39262b4ea377731c39c566a..d0e8b873ed0d0740ad506f2f1003a67f6d415bc7 100644 --- a/src/rusage.c +++ b/src/rusage.c @@ -305,7 +305,6 @@ PMOD_EXPORT int pike_get_rusage(pike_rusage_t rusage_values) } #else /*HAVE_TIMES */ -#if defined(HAVE_CLOCK) #ifndef CLOCKS_PER_SEC #define CLOCKS_PER_SEC 1000000 @@ -318,23 +317,6 @@ PMOD_EXPORT int pike_get_rusage(pike_rusage_t rusage_values) return 1; } -#else /* HAVE_CLOCK */ - -PMOD_EXPORT int pike_get_rusage(pike_rusage_t rusage_values) -{ - /* This is totally wrong, but hey, if you can't do it _right_... */ - struct timeval tm; - memset(rusage_values, 0, sizeof(pike_rusage_t)); -#ifndef CONFIGURE_TEST - ACCURATE_GETTIMEOFDAY(&tm); -#else - GETTIMEOFDAY(&tm); -#endif - rusage_values[0]=tm.tv_sec*1000L + tm.tv_usec/1000; - return 1; -} - -#endif /* HAVE_CLOCK */ #endif /* HAVE_TIMES */ #endif /* HAVE_GETRUSAGE */ #endif /* GETRUSAGE_THROUGH_PROCFS */ diff --git a/src/threads.c b/src/threads.c index 41c7c81cd939dc2bfc32957a17ee80d7bcf9ee78..6f82eebf16f53230be64870c4d64ab1a5d493715 100644 --- a/src/threads.c +++ b/src/threads.c @@ -360,10 +360,9 @@ static void cleanup_thread_state (struct thread_state *th); #ifndef CONFIGURE_TEST -#if defined(HAVE_CLOCK) && \ - (defined (RDTSC) || \ +#if defined (RDTSC) || \ (!defined(HAVE_GETHRTIME) && \ - !(defined(HAVE_MACH_TASK_INFO_H) && defined(TASK_THREAD_TIMES_INFO)))) + !(defined(HAVE_MACH_TASK_INFO_H) && defined(TASK_THREAD_TIMES_INFO))) static clock_t thread_start_clock = 0; static THREAD_T last_clocked_thread = 0; #define USE_CLOCK_FOR_SLICES