mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-19 01:33:52 +08:00
* calculate interrupt load * forgot to change this * being cautious about overflows * utils * fix bootstub * cleanup * also exclude pedal * fix misra Co-authored-by: Comma Device <device@comma.ai>
6 lines
230 B
C
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;
|
|
}
|