Openpilot clock.pyx

Angelosoyannwo
Mar 11, 2022

This module defines a system clock. The file extension is a .pyx indicating that is has been written in pyrex. The CLOCK_BOOT and CLOCK_BOOTTIME are ENUMS defined in the posix.time.pxd cython modules.

The readclock method returns the current time increments it by a small fraction and then returns the current time value. CLOCK_MONOTONIC_RAW is a clock type that is not reset by time. It is good for implementing precise time based algorithms.

sec_since_boot will return the amount of time since the system booted up.

--

--