diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:34 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:34 -0800 |
commit | 50eb784bfcf15ee3c6b0b53d747db92673395040 (patch) | |
tree | 60f039bb5aa27bc58d92ab0c7bab0d82dbfe7686 /time.c | |
parent | ae2b295c7deaf2d7c18ad1ed9b6050970e56bae7 (diff) | |
download | scm-50eb784bfcf15ee3c6b0b53d747db92673395040.tar.gz scm-50eb784bfcf15ee3c6b0b53d747db92673395040.zip |
Import Upstream version 5e3upstream/5e3
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 |