diff options
author | Richard Oudkerk <shibturn@gmail.com> | 2013-04-17 20:24:58 (GMT) |
---|---|---|
committer | Richard Oudkerk <shibturn@gmail.com> | 2013-04-17 20:24:58 (GMT) |
commit | 245bbee0d5ba93cb7edecb21173da82afb66ded6 (patch) | |
tree | 54ad95a497b17c67f19976cf97e1ac4351928fbb /Modules/timemodule.c | |
parent | b147f60a3840e59ded58a7cb4a9db1305743302a (diff) | |
parent | 0471ac3d80cb9acdfc82b053145477f5f1e7c6f1 (diff) | |
download | cpython-245bbee0d5ba93cb7edecb21173da82afb66ded6.zip cpython-245bbee0d5ba93cb7edecb21173da82afb66ded6.tar.gz cpython-245bbee0d5ba93cb7edecb21173da82afb66ded6.tar.bz2 |
Merge.
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r-- | Modules/timemodule.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index d5ffdcc..429215f 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -185,14 +185,18 @@ time_clock_settime(PyObject *self, PyObject *args) { int clk_id; PyObject *obj; + time_t tv_sec; + long tv_nsec; struct timespec tp; int ret; if (!PyArg_ParseTuple(args, "iO:clock_settime", &clk_id, &obj)) return NULL; - if (_PyTime_ObjectToTimespec(obj, &tp.tv_sec, &tp.tv_nsec) == -1) + if (_PyTime_ObjectToTimespec(obj, &tv_sec, &tv_nsec) == -1) return NULL; + tp.tv_sec = tv_sec; + tp.tv_nsec = tv_nsec; ret = clock_settime((clockid_t)clk_id, &tp); if (ret != 0) { |