Victor Stinner
5c5022b862
gh-112567: Add _PyTimeFraction C API ( #112568 )
...
Use a fraction internally in the _PyTime API to reduce the risk of
integer overflow: simplify the fraction using Greatest Common
Divisor (GCD). The fraction API is used by time functions:
perf_counter(), monotonic() and process_time().
For example, QueryPerformanceFrequency() usually returns 10 MHz on
Windows 10 and newer. The fraction SEC_TO_NS / frequency =
1_000_000_000 / 10_000_000 can be simplified to 100 / 1.
* Add _PyTimeFraction type.
* Add functions:
* _PyTimeFraction_Set()
* _PyTimeFraction_Mul()
* _PyTimeFraction_Resolution()
* No longer check "numer * denom <= _PyTime_MAX" in
_PyTimeFraction_Set(). _PyTimeFraction_Mul() uses _PyTime_Mul()
which handles integer overflow.
2023-12-01 19:50:10 +01:00
..
2023-11-15 23:53:38 +00:00
2023-11-20 15:52:00 +02:00
2023-10-08 10:01:39 +03:00
2023-12-01 08:37:30 +09:00
2023-11-20 15:52:00 +02:00
2023-11-10 20:49:24 +00:00
2023-10-26 16:42:42 +03:00
2023-10-17 14:30:31 +02:00
2023-11-29 17:37:05 +02:00
2023-11-20 15:52:00 +02:00
2023-11-03 14:01:56 -07:00
2023-11-07 22:36:13 +00:00
2023-12-01 17:05:56 +01:00
2023-07-22 17:04:34 +02:00
2023-11-15 04:28:30 +00:00
2023-08-21 19:15:52 +02:00
2023-08-24 20:01:50 +00:00
2023-11-27 18:35:52 +01:00
2023-10-17 14:30:31 +02:00
2023-10-20 18:08:41 +03:00
2023-11-12 00:56:27 +01:00
2023-11-08 19:42:41 +02:00
2023-09-17 14:23:31 +03:00
2023-11-19 10:13:58 +09:00
2023-10-17 14:30:31 +02:00
2023-11-15 23:53:38 +00:00
2023-07-25 14:34:49 +03:00
2023-11-13 04:58:34 +00:00
2023-09-03 18:54:27 +02:00
2023-11-02 09:16:34 +00:00
2023-08-21 19:15:52 +02:00
2023-11-14 00:31:02 +00:00
2023-08-01 15:45:51 +09:00
2023-11-27 18:09:41 +00:00
2023-09-03 17:28:14 +03:00
2023-10-17 23:05:49 +00:00
2023-11-28 03:27:39 +00:00
2023-11-20 15:52:00 +02:00
2023-11-28 16:15:39 -08:00
2023-11-20 15:52:00 +02:00
2023-10-17 14:30:31 +02:00
2023-11-27 18:41:47 +01:00
2023-11-22 10:32:43 +09:00
2023-11-22 15:03:33 -07:00
2023-11-20 15:52:00 +02:00
2023-10-16 13:42:44 +02:00
2023-11-20 15:52:00 +02:00
2023-11-22 15:03:33 -07:00
2023-10-17 14:30:31 +02:00
2023-07-18 23:59:53 +03:00
2023-11-27 18:46:43 +01:00
2023-09-03 18:54:27 +02:00
2023-08-28 16:04:27 +03:00
2023-08-13 10:24:59 +01:00
2023-11-20 15:52:00 +02:00
2023-11-19 10:43:51 +09:00
2023-10-20 18:08:41 +03:00
2023-10-30 16:53:10 -06:00
2023-11-23 00:55:00 +00:00
2023-11-01 19:54:32 +02:00
2023-10-25 11:33:48 +02:00
2023-11-03 09:45:53 +02:00
2023-10-23 12:54:46 +03:00
2023-10-12 09:34:35 +02:00
2023-11-20 15:52:00 +02:00
2023-09-30 20:06:45 +00:00
2023-08-27 00:35:06 +03:00
2023-11-12 01:03:34 +01:00
2023-09-01 18:36:53 +02:00
2023-11-22 01:20:57 -05:00
2023-11-01 21:11:18 +00:00
2023-10-17 14:30:31 +02:00
2023-11-20 15:52:00 +02:00
2023-08-24 20:25:22 +02:00
2023-10-26 15:17:28 +09:00
2023-10-27 23:52:04 -05:00
2023-11-15 23:53:38 +00:00
2023-11-09 20:13:35 +09:00
2023-10-20 18:08:41 +03:00
2023-12-01 17:05:56 +01:00
2023-09-07 02:09:06 +02:00
2023-09-02 16:50:18 +02:00
2023-11-27 18:51:31 +01:00
2023-12-01 14:05:55 +00:00
2023-11-20 15:52:00 +02:00
2023-11-04 21:45:24 +00:00
2023-10-04 22:50:29 +00:00
2023-10-04 22:50:29 +00:00
2023-11-15 03:41:29 +01:00
2023-11-15 23:53:38 +00:00
2023-11-15 23:53:38 +00:00
2023-11-15 23:53:38 +00:00
2023-11-02 09:16:34 +00:00
2023-12-01 15:16:49 +00:00
2023-08-10 00:47:46 +00:00
2023-09-29 02:08:04 +00:00
2023-10-17 14:30:31 +02:00
2023-10-05 11:02:52 +00:00
2023-12-01 19:50:10 +01:00
2023-11-15 16:42:17 +00:00
2023-11-04 15:56:58 +01:00
2023-11-15 16:42:17 +00:00
2023-11-20 15:52:00 +02:00
2023-11-20 15:52:00 +02:00
2023-09-02 17:51:19 +02:00
2023-08-21 19:15:52 +02:00