summaryrefslogtreecommitdiff
path: root/rts/GetTime.h
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2011-10-25 18:41:46 +0100
committerDuncan Coutts <duncan@well-typed.com>2011-10-26 12:00:42 +0100
commitece21ea00b8681b09c9eedbebbac1af764864367 (patch)
treec46d45e42baf9cad94ed2eb40e34865830ef7d60 /rts/GetTime.h
parent17c166232cf2a547a9b0a4fce5f38307ae64f157 (diff)
downloadhaskell-ece21ea00b8681b09c9eedbebbac1af764864367.tar.gz
Add rts time util getUnixEpochTime
The other existing time utilities give us time elapsed since process or thread start. This is for wall clock time, using the common Unix epoch interpretation.
Diffstat (limited to 'rts/GetTime.h')
-rw-r--r--rts/GetTime.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/GetTime.h b/rts/GetTime.h
index 7b89c05822..b8d402db7c 100644
--- a/rts/GetTime.h
+++ b/rts/GetTime.h
@@ -22,6 +22,11 @@ Ticks getThreadCPUTime (void);
Ticks getProcessElapsedTime (void);
void getProcessTimes (Ticks *user, Ticks *elapsed);
+/* Get the current date and time.
+ Uses seconds since the Unix epoch, plus nanoseconds
+ */
+void getUnixEpochTime (StgWord64 *sec, StgWord32 *nsec);
+
// Not strictly timing, but related
nat getPageFaults (void);