8000 gh-81057: Fix an ifdef in the time module (#100125) · python/cpython@3e06b50 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3e06b50

Browse files
gh-81057: Fix an ifdef in the time module (#100125)
An earlier commit only defined check_ticks_per_second() when HAVE_TIMES is defined. However, we also need it when HAVE_CLOCK is defined. This primarily affects Windows. #81057
1 parent 1160001 commit 3e06b50

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Modules/timemodule.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@
6262
#define SEC_TO_NS (1000 * 1000 * 1000)
6363

6464

65-
#ifdef HAVE_TIMES
66-
65+
#if defined(HAVE_TIMES) || defined(HAVE_CLOCK)
6766
static int
6867
check_ticks_per_second(long tps, const char *context)
6968
{
@@ -75,6 +74,9 @@ check_ticks_per_second(long tps, const char *context)
7574
}
7675
return 0;
7776
}
77+
#endif /* HAVE_TIMES || HAVE_CLOCK */
78+
79+
#ifdef HAVE_TIMES
7880

7981
# define ticks_per_second _PyRuntime.time.ticks_per_second
8082

0 commit comments

Comments
 (0)
0