summaryrefslogtreecommitdiff
path: root/rts/RtsSymbols.c
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2017-09-19 15:09:29 -0400
committerBen Gamari <ben@smart-cactus.org>2017-09-19 15:58:45 -0400
commit28a115e5e2c3c19b860545f1fcde4317bac3ee2a (patch)
tree35b97efde537ab5d79bb9abe4cf71c7a9c2d8961 /rts/RtsSymbols.c
parent7c7914d02a7ff189aba2f4feca31366fb4ab2664 (diff)
downloadhaskell-28a115e5e2c3c19b860545f1fcde4317bac3ee2a.tar.gz
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
Diffstat (limited to 'rts/RtsSymbols.c')
-rw-r--r--rts/RtsSymbols.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c
index fb9be7faa0..a696f44476 100644
--- a/rts/RtsSymbols.c
+++ b/rts/RtsSymbols.c
@@ -605,6 +605,7 @@
SymI_HasProto(getFullProgArgv) \
SymI_HasProto(setFullProgArgv) \
SymI_HasProto(freeFullProgArgv) \
+ SymI_HasProto(getProcessElapsedTime) \
SymI_HasProto(getStablePtr) \
SymI_HasProto(foreignExportStablePtr) \
SymI_HasProto(hs_init) \