summaryrefslogtreecommitdiff
path: root/Include/pytime.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-09-02 01:43:56 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-09-02 01:43:56 +0200
commit744742320f259776dab1c8ef86e22225ef569d17 (patch)
treeefc22921e39c78260a77c39ee277d4a89544401b /Include/pytime.h
parentbbdda21a7a54c30211b33ad736d7bbbf19ea08df (diff)
downloadcpython-git-744742320f259776dab1c8ef86e22225ef569d17.tar.gz
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 027c3d803a..98ae12bae5 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. */