<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Python/pytime.c, branch master</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/pytime.c?h=master</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/pytime.c?h=master'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2023-02-22T19:11:59Z</updated>
<entry>
<title>[3.11] gh-97786: Fix compiler warnings in pytime.c (GH-101826) (#102062)</title>
<updated>2023-02-22T19:11:59Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2023-02-22T19:11:59Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ddb65c47b1066fec8ce7a674ebb88b167f417d84'/>
<id>urn:sha1:ddb65c47b1066fec8ce7a674ebb88b167f417d84</id>
<content type='text'>
gh-97786: Fix compiler warnings in pytime.c (GH-101826)

Fixes compiler warnings in pytime.c.
(cherry picked from commit b1b375e2670a58fc37cb4c2629ed73b045159918)

Co-authored-by: Mark Dickinson &lt;dickinsm@gmail.com&gt;
Co-authored-by: Shantanu &lt;12621235+hauntsaninja@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>gh-91731: Replace Py_BUILD_ASSERT() with static_assert() (#91730)</title>
<updated>2022-04-20T17:26:40Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2022-04-20T17:26:40Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7cdaf87ec50f76c934ba651256484c4624b84ef2'/>
<id>urn:sha1:7cdaf87ec50f76c934ba651256484c4624b84ef2</id>
<content type='text'>
Python 3.11 now uses C11 standard which adds static_assert()
to &lt;assert.h&gt;.

* In pytime.c, replace Py_BUILD_ASSERT() with preprocessor checks on
  SIZEOF_TIME_T with #error.
* On macOS, py_mach_timebase_info() now accepts timebase members with
  the same size than _PyTime_t.
* py_get_monotonic_clock() now saturates GetTickCount64() to
  _PyTime_MAX: GetTickCount64() is unsigned, whereas _PyTime_t is
  signed.</content>
</entry>
<entry>
<title>bpo-46670: Test if a macro is defined, not its value (GH-31178)</title>
<updated>2022-02-07T00:46:51Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2022-02-07T00:46:51Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b556f53785cb9ad8cc088ad8c10efee91fe3da58'/>
<id>urn:sha1:b556f53785cb9ad8cc088ad8c10efee91fe3da58</id>
<content type='text'>
* audioop.c: #ifdef WORDS_BIGENDIAN
* ctypes.h: #ifdef USING_MALLOC_CLOSURE_DOT_C
* _ctypes/malloc_closure.c: #ifdef HAVE_FFI_CLOSURE_ALLOC
  and #ifdef USING_APPLE_OS_LIBFFI
* pytime.c: #ifdef __APPLE__
* unicodeobject.c: #ifdef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION</content>
</entry>
<entry>
<title>bpo-45412: Remove Py_SET_ERRNO_ON_MATH_ERROR() macro (GH-28820)</title>
<updated>2021-10-11T19:00:25Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-10-11T19:00:25Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2f92e2a590f0e5d2d3093549f5af9a4a1889eb5a'/>
<id>urn:sha1:2f92e2a590f0e5d2d3093549f5af9a4a1889eb5a</id>
<content type='text'>
Remove the following math macros using the errno variable:

* Py_ADJUST_ERANGE1()
* Py_ADJUST_ERANGE2()
* Py_OVERFLOWED()
* Py_SET_ERANGE_IF_OVERFLOW()
* Py_SET_ERRNO_ON_MATH_ERROR()

Create pycore_pymath.h internal header file.

Rename Py_ADJUST_ERANGE1() and Py_ADJUST_ERANGE2() to
_Py_ADJUST_ERANGE1() and _Py_ADJUST_ERANGE2(), and convert these
macros to static inline functions.

Move the following macros to pycore_pymath.h:

* _Py_IntegralTypeSigned()
* _Py_IntegralTypeMax()
* _Py_IntegralTypeMin()
* _Py_InIntegralTypeRange()</content>
</entry>
<entry>
<title>bpo-41710: Add private _PyDeadline_Get() function (GH-28674)</title>
<updated>2021-10-01T11:29:25Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-10-01T11:29:25Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=833fdf126c8fe77fd17e8a8ffbc5c571b3bf64bd'/>
<id>urn:sha1:833fdf126c8fe77fd17e8a8ffbc5c571b3bf64bd</id>
<content type='text'>
Add a private C API for deadlines: add _PyDeadline_Init() and
_PyDeadline_Get() functions.

* Add _PyTime_Add() and _PyTime_Mul() functions which compute t1+t2
  and t1*t2 and clamp the result on overflow.
* _PyTime_MulDiv() now uses _PyTime_Add() and _PyTime_Mul().</content>
</entry>
<entry>
<title>bpo-41710: Fix building pytime.c on Windows (GH-28644)</title>
<updated>2021-09-30T01:50:29Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-09-30T01:50:29Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=0231b6da45b610d33ee4e99bf190e31488d6ab26'/>
<id>urn:sha1:0231b6da45b610d33ee4e99bf190e31488d6ab26</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bpo-41710: Add pytime_add() and pytime_mul() (GH-28642)</title>
<updated>2021-09-30T01:07:11Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-09-30T01:07:11Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=d62d925823b005c33b432e527562b573a3a89635'/>
<id>urn:sha1:d62d925823b005c33b432e527562b573a3a89635</id>
<content type='text'>
Add pytime_add() and pytime_mul() functions to pytime.c to compute
t+t2 and t*k with clamping to [_PyTime_MIN; _PyTime_MAX].

Fix pytime.h: _PyTime_FromTimeval() is not implemented on Windows.</content>
</entry>
<entry>
<title>bpo-41710: Add _PyTime_AsTimespec_clamp() (GH-28629)</title>
<updated>2021-09-30T00:11:41Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-09-30T00:11:41Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=09796f2f142fdb1214f34a3ca917959ecb32a88b'/>
<id>urn:sha1:09796f2f142fdb1214f34a3ca917959ecb32a88b</id>
<content type='text'>
Add the _PyTime_AsTimespec_clamp() function: similar to
_PyTime_AsTimespec(), but clamp to _PyTime_t min/max and don't raise
an exception.

PyThread_acquire_lock_timed() now uses _PyTime_AsTimespec_clamp() to
remove the Py_UNREACHABLE() code path.

* Add _PyTime_AsTime_t() function.
* Add PY_TIME_T_MIN and PY_TIME_T_MAX constants.
* Replace _PyTime_AsTimeval_noraise() with _PyTime_AsTimeval_clamp().
* Add pytime_divide_round_up() function.
* Fix integer overflow in pytime_divide().
* Add pytime_divmod() function.</content>
</entry>
<entry>
<title>bpo-41299: QueryPerformanceFrequency() cannot fail (GH-28552)</title>
<updated>2021-09-24T22:31:56Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-09-24T22:31:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f35ddf24227e834c9b6b39ad23a0ec382b4de48b'/>
<id>urn:sha1:f35ddf24227e834c9b6b39ad23a0ec382b4de48b</id>
<content type='text'>
py_win_perf_counter_frequency() no longer checks for
QueryPerformanceFrequency() failure. According to the
QueryPerformanceFrequency() documentation, the function can no longer
fails since Windows XP.</content>
</entry>
<entry>
<title>bpo-21302: time.sleep() uses waitable timer on Windows (GH-28483)</title>
<updated>2021-09-22T14:09:30Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-09-22T14:09:30Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=58f8adfda3c2b42f654a55500e8e3a6433cb95f2'/>
<id>urn:sha1:58f8adfda3c2b42f654a55500e8e3a6433cb95f2</id>
<content type='text'>
On Windows, time.sleep() now uses a waitable timer which has a
resolution of 100 ns (10^-7 sec). Previously, it had a solution of 1
ms (10^-3 sec).

* On Windows, time.sleep() now calls PyErr_CheckSignals() before
  resetting the SIGINT event.
* Add _PyTime_As100Nanoseconds() function.
* Complete and update time.sleep() documentation.

Co-authored-by: Livius &lt;egyszeregy@freemail.hu&gt;</content>
</entry>
</feed>
