mirror of
https://github.com/python/cpython.git
synced 2025-11-10 22:36:18 +00:00
Added GetTicks() here, so profiling can use a decent timer
This commit is contained in:
parent
faad995380
commit
898ac1bb46
1 changed files with 9 additions and 0 deletions
|
|
@ -601,6 +601,14 @@ MacOS_DebugStr(PyObject *self, PyObject *args)
|
||||||
return Py_None;
|
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 char openrf_doc[] = "Open resource fork of a file";
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
|
@ -676,6 +684,7 @@ static PyMethodDef MacOS_Methods[] = {
|
||||||
{"openrf", MacOS_openrf, 1, openrf_doc},
|
{"openrf", MacOS_openrf, 1, openrf_doc},
|
||||||
{"splash", MacOS_splash, 1, splash_doc},
|
{"splash", MacOS_splash, 1, splash_doc},
|
||||||
{"DebugStr", MacOS_DebugStr, 1, DebugStr_doc},
|
{"DebugStr", MacOS_DebugStr, 1, DebugStr_doc},
|
||||||
|
{"GetTicks", MacOS_GetTicks, 1, GetTicks_doc},
|
||||||
{NULL, NULL} /* Sentinel */
|
{NULL, NULL} /* Sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue