I'm going to be running a set of PID control loops on a BBB running a customized Ubuntu image. PID control works best when it is called fairly accurately over the same time period because of the integration/derivation. What's the best way to get accurate timing on this setup? I haven't come across much on using the timers on an interrupt, and I fear the usleep() calls won't be very accurate.