summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1997-09-01 15:38:12 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1997-09-01 15:38:12 (GMT)
commit898ac1bb46c3195c721c7841d6c4dd48d56e302d (patch)
treeb7524553e2959058fdd006b029b2d0bc9dfdc511
parentfaad995380141f6a71497ec6ec4a9a0a9db756c9 (diff)
downloadcpython-898ac1bb46c3195c721c7841d6c4dd48d56e302d.zip
cpython-898ac1bb46c3195c721c7841d6c4dd48d56e302d.tar.gz
cpython-898ac1bb46c3195c721c7841d6c4dd48d56e302d.tar.bz2
Added GetTicks() here, so profiling can use a decent timer
-rw-r--r--Mac/Modules/macosmodule.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c
index dc16243..d187ac3 100644
--- a/Mac/Modules/macosmodule.c
+++ b/Mac/Modules/macosmodule.c
@@ -601,6 +601,14 @@ MacOS_DebugStr(PyObject *self, PyObject *args)
return Py_None;
}
+static char GetTicks_doc[] = "Return number of ticks since bootup";
+
+static PyObject *
+MacOS_GetTicks(PyObject *self, PyObject *args)
+{
+ return Py_BuildValue("i", (int)LMGetTicks());
+}
+
static char openrf_doc[] = "Open resource fork of a file";
static PyObject *
@@ -676,6 +684,7 @@ static PyMethodDef MacOS_Methods[] = {
{"openrf", MacOS_openrf, 1, openrf_doc},
{"splash", MacOS_splash, 1, splash_doc},
{"DebugStr", MacOS_DebugStr, 1, DebugStr_doc},
+ {"GetTicks", MacOS_GetTicks, 1, GetTicks_doc},
{NULL, NULL} /* Sentinel */
};