mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #23517: Add "half up" rounding mode to the _PyTime API
This commit is contained in:
parent
bbdda21a7a
commit
744742320f
4 changed files with 122 additions and 15 deletions
|
@ -30,7 +30,10 @@ typedef enum {
|
|||
_PyTime_ROUND_FLOOR=0,
|
||||
/* Round towards infinity (+inf).
|
||||
For example, used for timeout to wait "at least" N seconds. */
|
||||
_PyTime_ROUND_CEILING
|
||||
_PyTime_ROUND_CEILING=1,
|
||||
/* Round to nearest with ties going away from zero.
|
||||
For example, used to round from a Python float. */
|
||||
_PyTime_ROUND_HALF_UP
|
||||
} _PyTime_round_t;
|
||||
|
||||
/* Convert a time_t to a PyLong. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue