Generated by Cython 0.28.5
Yellow lines hint at Python interaction.
Click on a line that starts with a "+
" to see the C code that Cython generated for it.
Raw output: monotonic_time.c
01: # This file is part of Xpra.
02: # Copyright (C) 2017 Antoine Martin <antoine@devloop.org.uk>
03: # Xpra is released under the terms of the GNU GPL v2, or, at your option, any
04: # later version. See the file COPYING for details.
05:
06: #cython: boundscheck=False, wraparound=False, cdivision=True
07: from __future__ import absolute_import
08:
09: from libc.time cimport time_t
10:
11:
12: cdef extern from "monotonic_ctime.h":
13: double get_monotonic_time()
14:
+15: def _monotonic_time():
/* Python wrapper */ static PyObject *__pyx_pw_4xpra_14monotonic_time_1_monotonic_time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_14monotonic_time_1_monotonic_time = {"_monotonic_time", (PyCFunction)__pyx_pw_4xpra_14monotonic_time_1_monotonic_time, METH_NOARGS, 0}; static PyObject *__pyx_pw_4xpra_14monotonic_time_1_monotonic_time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_monotonic_time (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_14monotonic_time__monotonic_time(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_14monotonic_time__monotonic_time(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_monotonic_time", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("xpra.monotonic_time._monotonic_time", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* … */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_14monotonic_time_1_monotonic_time, NULL, __pyx_n_s_xpra_monotonic_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_monotonic_time, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+16: return get_monotonic_time()
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(get_monotonic_time()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0;
17:
+18: cdef inline double monotonic_time():
static CYTHON_INLINE double __pyx_f_4xpra_14monotonic_time_monotonic_time(void) { double __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("monotonic_time", 0); /* … */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
+19: return get_monotonic_time()
__pyx_r = get_monotonic_time(); goto __pyx_L0;