summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-10-13 13:03:35 (GMT)
committerGitHub <noreply@github.com>2021-10-13 13:03:35 (GMT)
commit97308dfcdc0696e0b116c37386e2ff4d72e6c3f4 (patch)
treea827f813979840eb28c66d5b74ab6f653fe51207 /Modules/timemodule.c
parent7cdc2a0f4b785327ad9d55312409a06e554df3d5 (diff)
downloadcpython-97308dfcdc0696e0b116c37386e2ff4d72e6c3f4.zip
cpython-97308dfcdc0696e0b116c37386e2ff4d72e6c3f4.tar.gz
cpython-97308dfcdc0696e0b116c37386e2ff4d72e6c3f4.tar.bz2
bpo-45434: Move _Py_BEGIN_SUPPRESS_IPH to pycore_fileutils.h (GH-28922)
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r--Modules/timemodule.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 4639afa..ca8d62d 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -1,33 +1,28 @@
/* Time module */
#include "Python.h"
+#include "pycore_fileutils.h" // _Py_BEGIN_SUPPRESS_IPH
#include <ctype.h>
#ifdef HAVE_SYS_TIMES_H
-#include <sys/times.h>
+# include <sys/times.h>
#endif
-
#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
+# include <sys/types.h>
#endif
-
#if defined(HAVE_SYS_RESOURCE_H)
-#include <sys/resource.h>
+# include <sys/resource.h>
#endif
-
#ifdef QUICKWIN
-#include <io.h>
+# include <io.h>
#endif
-
#if defined(HAVE_PTHREAD_H)
# include <pthread.h>
#endif
-
#if defined(_AIX)
# include <sys/thread.h>
#endif
-
#if defined(__WATCOMC__) && !defined(__QNX__)
# include <i86.h>
#else
@@ -38,17 +33,17 @@
#endif /* !__WATCOMC__ || __QNX__ */
#ifdef _Py_MEMORY_SANITIZER
-# include <sanitizer/msan_interface.h>
+# include <sanitizer/msan_interface.h>
#endif
#ifdef _MSC_VER
-#define _Py_timezone _timezone
-#define _Py_daylight _daylight
-#define _Py_tzname _tzname
+# define _Py_timezone _timezone
+# define _Py_daylight _daylight
+# define _Py_tzname _tzname
#else
-#define _Py_timezone timezone
-#define _Py_daylight daylight
-#define _Py_tzname tzname
+# define _Py_timezone timezone
+# define _Py_daylight daylight
+# define _Py_tzname tzname
#endif
#if defined(__APPLE__ ) && defined(__has_builtin)
@@ -60,8 +55,10 @@
# define HAVE_CLOCK_GETTIME_RUNTIME 1
#endif
+
#define SEC_TO_NS (1000 * 1000 * 1000)
+
/* Forward declarations */
static int pysleep(_PyTime_t timeout);