Jan-21-2020, 09:38 PM
Most popular PCs run an operating system that is non-deterministic which means you usually get decent timing but you never know when new threads or processes may override your program and slow it down. The only way to guarantee timing precision is to run your code with a real-time OS. There are many of them but they are mostly designed for embedded targets and FPGAs.
https://en.wikipedia.org/wiki/Comparison...ng_systems
Of course even those RT-OSes have limits but they can get you micro or nano second timing. There is a popular Linux option called RTLinux that will run on standard PC architecture if you need reliable timing and like Linux. Without a realtime OS you could try looking into Windows thread priority property or Linux's Nice command.
https://en.wikipedia.org/wiki/Comparison...ng_systems
Of course even those RT-OSes have limits but they can get you micro or nano second timing. There is a popular Linux option called RTLinux that will run on standard PC architecture if you need reliable timing and like Linux. Without a realtime OS you could try looking into Windows thread priority property or Linux's Nice command.
"So, brave knights, if you do doubt your courage or your strength, come no further, for death awaits you all with nasty, big, pointy teeth!" - Tim the Enchanter