blob: 2c71d7a75d892b9382efa4df161b61483f834ff1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/* -----------------------------------------------------------------------------
*
* (c) The GHC Team, 2012
*
* Posix monotonic clock
*
* ---------------------------------------------------------------------------*/
#ifndef POSIX_CLOCK_H
#define POSIX_CLOCK_H
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_TIME_H
# include <time.h>
#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#ifdef HAVE_CLOCK_GETTIME
# ifdef _POSIX_MONOTONIC_CLOCK
# define CLOCK_ID CLOCK_MONOTONIC
# else
# define CLOCK_ID CLOCK_REALTIME
# endif
#elif defined(darwin_HOST_OS)
# include <mach/mach.h>
# include <mach/mach_time.h>
#endif
#endif /* POSIX_CLOCK_H */
|