time: fix constants availability (#5419)

This commit is contained in:
Shantanu authored and GitHub committed 2021-05-12 08:35:39 +02:00
1 parent a2d5f72e8a
commit 6bb1d885c6
5 files changed
+20 -11

No files matched your search

+14 -9
View File
@@ -13,23 +13,28 @@ daylight: int
timezone: int
tzname: Tuple[str, str]
if sys.version_info >= (3, 7) and sys.platform != "win32":
if sys.version_info >= (3, 7):
if sys.platform == "linux":
CLOCK_BOOTTIME: int
CLOCK_PROF: int # FreeBSD, NetBSD, OpenBSD
CLOCK_UPTIME: int # FreeBSD, OpenBSD
if sys.platform != "linux" and sys.platform != "win32" and sys.platform != "darwin":
CLOCK_PROF: int # FreeBSD, NetBSD, OpenBSD
CLOCK_UPTIME: int # FreeBSD, OpenBSD
if sys.version_info >= (3, 3) and sys.platform != "win32":
CLOCK_HIGHRES: int # Solaris only
CLOCK_MONOTONIC: int # Unix only
CLOCK_MONOTONIC_RAW: int # Linux 2.6.28 or later
CLOCK_PROCESS_CPUTIME_ID: int # Unix only
CLOCK_REALTIME: int # Unix only
CLOCK_THREAD_CPUTIME_ID: int # Unix only
CLOCK_MONOTONIC: int
CLOCK_MONOTONIC_RAW: int
CLOCK_PROCESS_CPUTIME_ID: int
CLOCK_REALTIME: int
CLOCK_THREAD_CPUTIME_ID: int
if sys.platform != "linux" and sys.platform != "darwin":
CLOCK_HIGHRES: int # Solaris only
if sys.version_info >= (3, 8) and sys.platform == "darwin":
CLOCK_UPTIME_RAW: int
if sys.version_info >= (3, 9) and sys.platform == "linux":
CLOCK_TAI: int
class _struct_time(NamedTuple):
tm_year: int
tm_mon: int