diff options
author | Victor Stinner <vstinner@python.org> | 2021-09-15 12:26:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 12:26:43 (GMT) |
commit | b49263b698993cad2b8aaddc55cdeaa678412b30 (patch) | |
tree | 8425d73518fbddd840e28d8e1d072b05778104d2 /PC/_testconsole.c | |
parent | 40d2ac92f9a28a486156dafdbb613016bb1f6b98 (diff) | |
download | cpython-b49263b698993cad2b8aaddc55cdeaa678412b30.zip cpython-b49263b698993cad2b8aaddc55cdeaa678412b30.tar.gz cpython-b49263b698993cad2b8aaddc55cdeaa678412b30.tar.bz2 |
bpo-21302: Add _PyTime_AsNanoseconds() (GH-28350)
Refactor pytime.c:
* Add pytime_from_nanoseconds() and pytime_as_nanoseconds(),
and use explicitly these functions
* Add two empty lines between functions
* PEP 7: add braces { ... }
* C99: declare variables where they are set
* Rename private functions to lowercase
* Rename error_time_t_overflow() to pytime_time_t_overflow()
* Rename win_perf_counter_frequency() to py_win_perf_counter_frequency()
* py_get_monotonic_clock(): add an assertion to detect overflow when
mach_absolute_time() unsigned uint64_t is casted to _PyTime_t
(signed int64_t).
_testcapi: use _PyTime_FromNanoseconds().
Diffstat (limited to 'PC/_testconsole.c')
0 files changed, 0 insertions, 0 deletions