Debian Codegraph @

src/bluetooth_data_tools/_time_impl.pyx

raw
1 import cython
2
3 from posix.time cimport clock_gettime, timespec
4
5
6 def _monotonic_time_coarse():
7 cdef timespec ts
8 cdef double current
9 clock_gettime(6, &ts)
10 current = ts.tv_sec + (ts.tv_nsec / 1000000000.)
11 return current