1 """Stub file for the 'time' module."""
\r
2 # See https://docs.python.org/3/library/time.html
\r
5 from typing import Any, NamedTuple, Tuple, Union, Optional
\r
6 if sys.version_info >= (3, 3):
\r
7 from types import SimpleNamespace
\r
9 _TimeTuple = Tuple[int, int, int, int, int, int, int, int, int]
\r
11 if sys.version_info < (3, 3):
\r
16 tzname: Tuple[str, str]
\r
18 if sys.version_info >= (3, 7) and sys.platform != 'win32':
\r
19 CLOCK_BOOTTIME: int # Linux
\r
20 CLOCK_PROF: int # FreeBSD, NetBSD, OpenBSD
\r
21 CLOCK_UPTIME: int # FreeBSD, OpenBSD
\r
23 if sys.version_info >= (3, 3) and sys.platform != 'win32':
\r
24 CLOCK_HIGHRES: int = ... # Solaris only
\r
25 CLOCK_MONOTONIC: int = ... # Unix only
\r
26 CLOCK_MONOTONIC_RAW: int = ... # Linux 2.6.28 or later
\r
27 CLOCK_PROCESS_CPUTIME_ID: int = ... # Unix only
\r
28 CLOCK_REALTIME: int = ... # Unix only
\r
29 CLOCK_THREAD_CPUTIME_ID: int = ... # Unix only
\r
32 if sys.version_info >= (3, 3):
\r
36 [('tm_year', int), ('tm_mon', int), ('tm_mday', int),
\r
37 ('tm_hour', int), ('tm_min', int), ('tm_sec', int),
\r
38 ('tm_wday', int), ('tm_yday', int), ('tm_isdst', int),
\r
39 ('tm_zone', str), ('tm_gmtoff', int)]
\r
45 Tuple[int, int, int, int, int, int, int, int, int],
\r
46 Tuple[int, int, int, int, int, int, int, int, int, str],
\r
47 Tuple[int, int, int, int, int, int, int, int, int, str, int]
\r
54 Tuple[int, int, int, int, int, int, int, int, int],
\r
55 Tuple[int, int, int, int, int, int, int, int, int, str],
\r
56 Tuple[int, int, int, int, int, int, int, int, int, str, int]
\r
59 ) -> struct_time: ...
\r
64 [('tm_year', int), ('tm_mon', int), ('tm_mday', int),
\r
65 ('tm_hour', int), ('tm_min', int), ('tm_sec', int),
\r
66 ('tm_wday', int), ('tm_yday', int), ('tm_isdst', int)]
\r
69 def __init__(self, o: _TimeTuple, _arg: Any = ...) -> None: ...
\r
70 def __new__(cls, o: _TimeTuple, _arg: Any = ...) -> struct_time: ...
\r
72 def asctime(t: Union[_TimeTuple, struct_time] = ...) -> str: ...
\r
73 def clock() -> float: ...
\r
74 def ctime(secs: Optional[float] = ...) -> str: ...
\r
75 def gmtime(secs: Optional[float] = ...) -> struct_time: ...
\r
76 def localtime(secs: Optional[float] = ...) -> struct_time: ...
\r
77 def mktime(t: Union[_TimeTuple, struct_time]) -> float: ...
\r
78 def sleep(secs: float) -> None: ...
\r
79 def strftime(format: str, t: Union[_TimeTuple, struct_time] = ...) -> str: ...
\r
80 def strptime(string: str, format: str = ...) -> struct_time: ...
\r
81 def time() -> float: ...
\r
82 if sys.platform != 'win32':
\r
83 def tzset() -> None: ... # Unix only
\r
85 if sys.version_info >= (3, 3):
\r
86 def get_clock_info(name: str) -> SimpleNamespace: ...
\r
87 def monotonic() -> float: ...
\r
88 def perf_counter() -> float: ...
\r
89 def process_time() -> float: ...
\r
90 if sys.platform != 'win32':
\r
91 def clock_getres(clk_id: int) -> float: ... # Unix only
\r
92 def clock_gettime(clk_id: int) -> float: ... # Unix only
\r
93 def clock_settime(clk_id: int, time: float) -> None: ... # Unix only
\r
95 if sys.version_info >= (3, 7):
\r
96 def clock_gettime_ns(clock_id: int) -> int: ...
\r
97 def clock_settime_ns(clock_id: int, time: int) -> int: ...
\r
98 def monotonic_ns() -> int: ...
\r
99 def perf_counter_ns() -> int: ...
\r
100 def process_time_ns() -> int: ...
\r
101 def time_ns() -> int: ...
\r
102 def thread_time() -> float: ...
\r
103 def thread_time_ns() -> int: ...
\r