Files
StarPilot/panda/board/utils.h
T
Vehicle Researcher 15ee981d5b openpilot v0.8.14 release
date: 2022-05-24T01:48:37
master commit: 71901c94dbbaa2f9f156a80c14cc7ea65219fc7c
2022-05-24 01:48:39 +00:00

6 lines
230 B
C

// compute the time elapsed (in microseconds) from 2 counter samples
// case where ts < ts_last is ok: overflow is properly re-casted into uint32_t
uint32_t get_ts_elapsed(uint32_t ts, uint32_t ts_last) {
return ts - ts_last;
}