summaryrefslogtreecommitdiffstats
path: root/Include/pytime.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-09-01 23:43:56 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-09-01 23:43:56 (GMT)
commit744742320f259776dab1c8ef86e22225ef569d17 (patch)
treeefc22921e39c78260a77c39ee277d4a89544401b /Include/pytime.h
parentbbdda21a7a54c30211b33ad736d7bbbf19ea08df (diff)
downloadcpython-744742320f259776dab1c8ef86e22225ef569d17.zip
cpython-744742320f259776dab1c8ef86e22225ef569d17.tar.gz
cpython-744742320f259776dab1c8ef86e22225ef569d17.tar.bz2
Issue #23517: Add "half up" rounding mode to the _PyTime API
Diffstat (limited to 'Include/pytime.h')
-rw-r--r--Include/pytime.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Include/pytime.h b/Include/pytime.h
index 027c3d8..98ae12b 100644
--- a/Include/pytime.h
+++ b/Include/pytime.h
@@ -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. */