summaryrefslogtreecommitdiff
path: root/ptw32_relmillisecs.c
diff options
context:
space:
mode:
Diffstat (limited to 'ptw32_relmillisecs.c')
-rw-r--r--ptw32_relmillisecs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c
index a82bfb7..c9224ff 100644
--- a/ptw32_relmillisecs.c
+++ b/ptw32_relmillisecs.c
@@ -36,12 +36,12 @@
#include "pthread.h"
#include "implement.h"
-#ifndef NEED_FTIME
+#if !defined(NEED_FTIME)
#include <sys/timeb.h>
#endif
-#ifdef PTW32_BUILD_INLINED
+#if defined(PTW32_BUILD_INLINED)
INLINE
#endif /* PTW32_BUILD_INLINED */
DWORD
@@ -52,7 +52,7 @@ ptw32_relmillisecs (const struct timespec * abstime)
DWORD milliseconds;
int64_t tmpAbsMilliseconds;
int64_t tmpCurrMilliseconds;
-#ifdef NEED_FTIME
+#if defined(NEED_FTIME)
struct timespec currSysTime;
FILETIME ft;
SYSTEMTIME st;
@@ -81,7 +81,7 @@ ptw32_relmillisecs (const struct timespec * abstime)
/* get current system time */
-#ifdef NEED_FTIME
+#if defined(NEED_FTIME)
GetSystemTime(&st);
SystemTimeToFileTime(&st, &ft);
@@ -98,7 +98,7 @@ ptw32_relmillisecs (const struct timespec * abstime)
#else /* ! NEED_FTIME */
-#ifdef _MSC_VER
+#if defined(_MSC_VER)
_ftime64_s(&currSysTime);
#elif (defined(__MINGW64__) || defined(__MINGW32__)) && __MSVCRT_VERSION__ >= 0x0601
_ftime64(&currSysTime);