summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorroot <root>2008-05-31 03:13:26 +0000
committerroot <root>2008-05-31 03:13:26 +0000
commitce1d3af4da4ab3752f20b86aee0f71ff23876d88 (patch)
tree8644b0a65f4572b110ac66d209cc8f320254972d /ev.c
parent78812248a6476d143b0def6d28280fe680f734e6 (diff)
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/ev.c b/ev.c
index 6c70810..e75e545 100644
--- a/ev.c
+++ b/ev.c
@@ -166,7 +166,11 @@ extern "C" {
/* this block tries to deduce configuration from header-defined symbols and defaults */
#ifndef EV_USE_MONOTONIC
-# define EV_USE_MONOTONIC 0
+# if defined (_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0
+# define EV_USE_MONOTONIC 1
+# else
+# define EV_USE_MONOTONIC 0
+# endif
#endif
#ifndef EV_USE_REALTIME
@@ -174,7 +178,11 @@ extern "C" {
#endif
#ifndef EV_USE_NANOSLEEP
-# define EV_USE_NANOSLEEP 0
+# if _POSIX_C_SOURCE >= 199309L
+# define EV_USE_NANOSLEEP 1
+# else
+# define EV_USE_NANOSLEEP 0
+# endif
#endif
#ifndef EV_USE_SELECT