diff options
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 47 |
1 files changed, 26 insertions, 21 deletions
@@ -101,6 +101,9 @@ # include <sys/types.h> # include <sys/time.h> # include <sys/timeb.h> +# include <sys/times.h> +# include <unistd.h> +# define CLKTCK (sysconf(_SC_CLK_TCK)) # define USE_GETTIMEOFDAY #endif #ifdef __MACH__ @@ -153,8 +156,8 @@ # define LACK_FTIME #endif #ifdef PLAN9 -#define LACK_FTIME -#define LACK_TIMES +# define LACK_FTIME +# define LACK_TIMES #endif #ifdef nosve # define LACK_FTIME @@ -219,30 +222,32 @@ # define LACK_FTIME #endif -#ifdef CLK_TCK -# define CLKTCK CLK_TCK -# ifdef CLOCKS_PER_SEC -# ifdef HAVE_UNIX -# ifndef ARM_ULIB -# include <sys/times.h> -# endif -# define LACK_CLOCK +#ifndef CLKTCK +# ifdef CLK_TCK +# define CLKTCK CLK_TCK +# ifdef CLOCKS_PER_SEC +# ifdef HAVE_UNIX +# ifndef ARM_ULIB +# include <sys/times.h> +# endif +# define LACK_CLOCK /* This is because clock() might be POSIX rather than ANSI. This occurs on HP-UX machines */ +# endif # endif -# endif -#else -# ifdef CLOCKS_PER_SEC -# define CLKTCK CLOCKS_PER_SEC # else -# define LACK_CLOCK -# ifdef AMIGA -# include <stddef.h> -# define LACK_TIMES -# define LACK_FTIME -# define CLKTCK 1000 +# ifdef CLOCKS_PER_SEC +# define CLKTCK CLOCKS_PER_SEC # else -# define CLKTCK 60 +# define LACK_CLOCK +# ifdef AMIGA +# include <stddef.h> +# define LACK_TIMES +# define LACK_FTIME +# define CLKTCK 1000 +# else +# define CLKTCK 60 +# endif # endif # endif #endif |