summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-28 03:09:41 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-03-28 03:09:41 (GMT)
commitb3b454407058cd57d8a401a5aeb018d4ccb87616 (patch)
treeb1e53ecf7dd67abfd8b1573e16c02210391f06d1 /Python
parentc337838af798354603457043e2ad8cfd3cbea36e (diff)
downloadcpython-b3b454407058cd57d8a401a5aeb018d4ccb87616.zip
cpython-b3b454407058cd57d8a401a5aeb018d4ccb87616.tar.gz
cpython-b3b454407058cd57d8a401a5aeb018d4ccb87616.tar.bz2
Issue #22117: Use the _PyTime_t API for time.clock_settime()
Remove also the now unused _PyTime_AddDouble() function.
Diffstat (limited to 'Python')
-rw-r--r--Python/pytime.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/Python/pytime.c b/Python/pytime.c
index 27004f3..0f05db4 100644
--- a/Python/pytime.c
+++ b/Python/pytime.c
@@ -251,23 +251,6 @@ _PyTime_ObjectToTimeval(PyObject *obj, time_t *sec, long *usec,
return _PyTime_ObjectToDenominator(obj, sec, usec, 1e6, round);
}
-void
-_PyTime_AddDouble(_PyTime_timeval *tv, double interval, _PyTime_round_t round)
-{
- _PyTime_timeval tv2;
- double frac;
-
- frac = fmod(interval, 1.0);
- interval = floor(interval);
- tv2.tv_sec = (long)interval;
- tv2.tv_usec = (long)(frac*1e6);
-
- tv->tv_sec += tv2.tv_sec;
- tv->tv_usec += tv2.tv_usec;
- tv->tv_sec += (time_t)(tv->tv_usec / SEC_TO_US);
- tv->tv_usec %= SEC_TO_US;
-}
-
/****************** NEW _PyTime_t API **********************/
static void