openpilot v0.5.13 release

old-commit-hash: dd34ccfe288ebda8e2568cf550994ae890379f45
This commit is contained in:
Vehicle Researcher
2019-06-06 04:38:45 +00:00
parent 86fb001d62
commit e47a2e6e30
106 changed files with 3754 additions and 1927 deletions
+16
View File
@@ -0,0 +1,16 @@
from posix.time cimport clock_gettime, timespec, CLOCK_BOOTTIME, CLOCK_MONOTONIC_RAW
cdef double readclock(int clock_id):
cdef timespec ts
cdef double current
clock_gettime(clock_id, &ts)
current = ts.tv_sec + (ts.tv_nsec / 1000000000.)
return current
def monotonic_time():
return readclock(CLOCK_MONOTONIC_RAW)
def sec_since_boot():
return readclock(CLOCK_BOOTTIME)