Changeset 388 for python/vendor/current/Modules/timingmodule.c
- Timestamp:
- Mar 19, 2014, 11:11:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/vendor/current/Modules/timingmodule.c
r2 r388 11 11 start_timing(PyObject *self) 12 12 { 13 14 15 13 Py_INCREF(Py_None); 14 BEGINTIMING; 15 return Py_None; 16 16 } 17 17 … … 19 19 finish_timing(PyObject *self) 20 20 { 21 ENDTIMING 22 23 21 ENDTIMING 22 Py_INCREF(Py_None); 23 return Py_None; 24 24 } 25 25 … … 27 27 seconds(PyObject *self) 28 28 { 29 29 return PyInt_FromLong(TIMINGS); 30 30 } 31 31 … … 33 33 milli(PyObject *self) 34 34 { 35 35 return PyInt_FromLong(TIMINGMS); 36 36 } 37 37 … … 39 39 micro(PyObject *self) 40 40 { 41 41 return PyInt_FromLong(TIMINGUS); 42 42 } 43 43 44 44 45 45 static PyMethodDef timing_methods[] = { 46 47 48 49 50 51 46 {"start", (PyCFunction)start_timing, METH_NOARGS}, 47 {"finish", (PyCFunction)finish_timing, METH_NOARGS}, 48 {"seconds", (PyCFunction)seconds, METH_NOARGS}, 49 {"milli", (PyCFunction)milli, METH_NOARGS}, 50 {"micro", (PyCFunction)micro, METH_NOARGS}, 51 {NULL, NULL} 52 52 }; 53 53 … … 57 57 if (PyErr_WarnPy3k("the timing module has been removed in " 58 58 "Python 3.0; use time.clock() instead", 2) < 0) 59 60 61 59 return; 60 61 (void)Py_InitModule("timing", timing_methods); 62 62 }
Note:
See TracChangeset
for help on using the changeset viewer.