5062023fb6c8a0eff9300d8dc9c06396a3b8f4e3
[ghc.git] / rts / posix / Clock.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 2012
4 *
5 * Posix monotonic clock
6 *
7 * ---------------------------------------------------------------------------*/
8
9 #ifndef POSIX_CLOCK_H
10 #define POSIX_CLOCK_H
11
12 #ifdef HAVE_UNISTD_H
13 # include <unistd.h>
14 #endif
15
16 #ifdef HAVE_TIME_H
17 # include <time.h>
18 #endif
19
20 #ifdef HAVE_SYS_TIME_H
21 # include <sys/time.h>
22 #endif
23
24 #ifdef HAVE_CLOCK_GETTIME
25 # ifdef _POSIX_MONOTONIC_CLOCK
26 # define CLOCK_ID CLOCK_MONOTONIC
27 # else
28 # define CLOCK_ID CLOCK_REALTIME
29 # endif
30 #endif
31
32 #endif /* POSIX_CLOCK_H */