diff --git a/stdlib/time.pyi b/stdlib/time.pyi index 815171f0c..c1a8727b1 100644 --- a/stdlib/time.pyi +++ b/stdlib/time.pyi @@ -100,6 +100,9 @@ if sys.version_info >= (3, 7): def clock_gettime_ns(clock_id: int) -> int: ... def clock_settime_ns(clock_id: int, time: int) -> int: ... + if sys.platform == "linux": + def pthread_getcpuclockid(thread_id: int) -> int: ... + def monotonic_ns() -> int: ... def perf_counter_ns() -> int: ... def process_time_ns() -> int: ... diff --git a/tests/stubtest_allowlists/linux-py310.txt b/tests/stubtest_allowlists/linux-py310.txt index fd9123733..995d80026 100644 --- a/tests/stubtest_allowlists/linux-py310.txt +++ b/tests/stubtest_allowlists/linux-py310.txt @@ -39,4 +39,3 @@ posix.eventfd_read posix.eventfd_write posix.pidfd_open posix.splice -time.pthread_getcpuclockid diff --git a/tests/stubtest_allowlists/linux-py37.txt b/tests/stubtest_allowlists/linux-py37.txt index 65b1d3a20..15011803b 100644 --- a/tests/stubtest_allowlists/linux-py37.txt +++ b/tests/stubtest_allowlists/linux-py37.txt @@ -1,6 +1,3 @@ ctypes.wintypes ftplib.FTP.trust_server_pasv_ipv4_address # Dangerous to use, intentionally undocumented, intentionally missing from typeshed. #6154 pwd.getpwnam - -# Exists at runtime, but missing from stubs -time.pthread_getcpuclockid diff --git a/tests/stubtest_allowlists/linux-py38.txt b/tests/stubtest_allowlists/linux-py38.txt index 1b2d122b2..639de17fc 100644 --- a/tests/stubtest_allowlists/linux-py38.txt +++ b/tests/stubtest_allowlists/linux-py38.txt @@ -3,4 +3,3 @@ select.epoll.register # Exists at runtime, but missing from stubs os.copy_file_range posix.copy_file_range -time.pthread_getcpuclockid diff --git a/tests/stubtest_allowlists/linux-py39.txt b/tests/stubtest_allowlists/linux-py39.txt index 125db92f2..1975288fa 100644 --- a/tests/stubtest_allowlists/linux-py39.txt +++ b/tests/stubtest_allowlists/linux-py39.txt @@ -6,4 +6,3 @@ os.copy_file_range os.pidfd_open posix.copy_file_range posix.pidfd_open -time.pthread_getcpuclockid