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