diff --git a/src/unix/cygwin.c b/src/unix/cygwin.c index 31b069f9c..a99779d4e 100644 --- a/src/unix/cygwin.c +++ b/src/unix/cygwin.c @@ -29,7 +29,7 @@ #include #undef NANOSEC -#define NANOSEC 1000000000 +#define NANOSEC ((uint64_t) 1e9) uint64_t uv_hrtime() { diff --git a/src/unix/freebsd.c b/src/unix/freebsd.c index 1e2c1d436..d916b0b12 100644 --- a/src/unix/freebsd.c +++ b/src/unix/freebsd.c @@ -38,7 +38,7 @@ #include #undef NANOSEC -#define NANOSEC 1000000000 +#define NANOSEC ((uint64_t) 1e9) #ifndef CPUSTATES # define CPUSTATES 5U diff --git a/src/unix/linux/core.c b/src/unix/linux/core.c index bee702691..34f48a94b 100644 --- a/src/unix/linux/core.c +++ b/src/unix/linux/core.c @@ -46,7 +46,7 @@ #endif #undef NANOSEC -#define NANOSEC 1000000000 +#define NANOSEC ((uint64_t) 1e9) /* This is rather annoying: CLOCK_BOOTTIME lives in but we can't * include that file because it conflicts with . We'll just have to diff --git a/src/unix/netbsd.c b/src/unix/netbsd.c index 2fedc94a3..a1a7091bb 100644 --- a/src/unix/netbsd.c +++ b/src/unix/netbsd.c @@ -32,7 +32,7 @@ #include #undef NANOSEC -#define NANOSEC 1000000000 +#define NANOSEC ((uint64_t) 1e9) uint64_t uv_hrtime(void) { diff --git a/src/unix/openbsd.c b/src/unix/openbsd.c index ec757a4a9..865f8e9e6 100644 --- a/src/unix/openbsd.c +++ b/src/unix/openbsd.c @@ -37,7 +37,7 @@ #include #undef NANOSEC -#define NANOSEC 1000000000 +#define NANOSEC ((uint64_t) 1e9) static char *process_title; diff --git a/test/benchmark-pound.c b/test/benchmark-pound.c index 1693c31c8..5c29a05b3 100644 --- a/test/benchmark-pound.c +++ b/test/benchmark-pound.c @@ -26,7 +26,7 @@ #define MAX_CONNS 1000 #undef NANOSEC -#define NANOSEC ((uint64_t)10e8) +#define NANOSEC ((uint64_t) 1e9) #undef DEBUG #define DEBUG 0 diff --git a/test/test-hrtime.c b/test/test-hrtime.c index 43400a464..91059f03a 100644 --- a/test/test-hrtime.c +++ b/test/test-hrtime.c @@ -27,7 +27,7 @@ #endif #ifndef NANOSEC -# define NANOSEC 1000000000 +# define NANOSEC ((uint64_t) 1e9) #endif