summaryrefslogtreecommitdiff
path: root/rts/GetTime.h
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/GetTime.h
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/GetTime.h')
-rw-r--r--rts/GetTime.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/rts/GetTime.h b/rts/GetTime.h
index 719b45f8b9..97f499cd6c 100644
--- a/rts/GetTime.h
+++ b/rts/GetTime.h
@@ -13,7 +13,6 @@
void initializeTimer (void);
Time getProcessCPUTime (void);
-Time getProcessElapsedTime (void);
void getProcessTimes (Time *user, Time *elapsed);
/* Get the current date and time.