Generated by Cython 0.28.3

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: from xpra.log import Logger
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Logger);
  __Pyx_GIVEREF(__pyx_n_s_Logger);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Logger);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_xpra_log, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Logger, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+12: log = Logger("util")
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_log, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* … */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_util); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);
 13: 
 14: 
 15: cdef extern from "monotonic_ctime.h":
 16:     double get_monotonic_time()
 17: 
+18: 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, 18, __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, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+19:     return get_monotonic_time()
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(get_monotonic_time()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 20: 
+21: 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;
}
+22:     return get_monotonic_time()
  __pyx_r = get_monotonic_time();
  goto __pyx_L0;