On Fri, Mar 24, 2017 at 1:03 PM, William Hermans <[email protected]> wrote: > I've honestly no idea how you're implementing what I suggested, so I can't > really comment on what's going on. sleep() won't work though, and I'm not > sure how usleep() is implemented for your particular OS( Debian Linux ), but > usleep() on micro-controllers( bare metal ) is usually less than 10 lines of > code. I want to say less than 6 lines of code, but it's been a while since > I've looked through an implementation.
On a bare-metal microcontroller, sleep() is a busy loop but in Linux sleep/usleep/nanosleep() results in a system call, which explains the latency differences. BTW, a busy loop on Linux could still be interrupted and result in latency. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAC%3D1GgEXofGW8r2fLsaNPSCWHmiuqa6XoXtTKqeBr00xJsq_fQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
