This is done by reusing the existing cross-platform
getProcessElapsedTime() function, which already provides
nanosecond monotonic clocks, and fallback for platforms that
don't have those.
To do this, getProcessElapsedTime() had to be moved from
a private RTS symbol into the public interface.
Accuracy is improved in 2 ways:
- Use of the monotonic clock where available
- Measuring the total time spent waiting instead of a sum of intervals (between which there are small gaps)