Skip to content
Snippets Groups Projects
Commit 28a115e5 authored by Niklas Hambüchen's avatar Niklas Hambüchen Committed by Ben Gamari
Browse files

base: fdReady(): Improve accuracy and simplify code.

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)

Reviewers: bgamari, austin, hvr, erikd, simonmar

Reviewed By: bgamari

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3953
parent 7c7914d0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment