gh-110850: Add PyTime_t C API (GH-115215)

* gh-110850: Add PyTime_t C API

Add PyTime_t API:

* PyTime_t type.
* PyTime_MIN and PyTime_MAX constants.
* PyTime_AsSecondsDouble(), PyTime_Monotonic(),
  PyTime_PerfCounter() and PyTime_GetSystemClock() functions.

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Petr Viktorin 2024-02-12 18:13:10 +01:00 committed by GitHub
parent c39272e143
commit 879f4546bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 448 additions and 114 deletions

View file

@ -262,7 +262,7 @@ random_seed_urandom(RandomObject *self)
static void
random_seed_time_pid(RandomObject *self)
{
_PyTime_t now;
PyTime_t now;
uint32_t key[5];
now = _PyTime_GetSystemClock();