3 ms·
> . All that being said, it’s also surprising how relatively expensive reading time is. Typically you don't need granularity as fine as you think you do. Readi
by lelanthran 3y ago
> . All that being said, it’s also surprising how relatively expensive reading time is.
Typically you don't need granularity as fine as you think you do. Reading time at the finest granularity available is going to kill your throughput/latency no matter what because you are probing the hardware, so make sure you need that very fine granularity.
IME, most (99.999%) of the case you need the time, you can get by with coarse granularity. I worked on realtime systems to control a jig in a factory, using embedded 486-class processors, with hard-realtime kernel patches, and even then I had no need to use the non-coarse timers when recording events for observability.
In any case, here's the relative costs of the different timers: https://www.lelanthran.com/chap5/content.html https://www.lelanthran.com/chap5/content.html