aboutsummaryrefslogtreecommitdiff
path: root/src/microspdy
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-23 18:34:19 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-23 18:34:19 +0000
commit9c2700afc5c81f9a9199f6989633d94167f6e68a (patch)
treef57b19d3ebecf3de738cf5307a739caaa341f97a /src/microspdy
parent9d0f953af2400c13f8a15f68e625d3d60351dd95 (diff)
downloadlibmicrohttpd-9c2700afc5c81f9a9199f6989633d94167f6e68a.tar.gz
libmicrohttpd-9c2700afc5c81f9a9199f6989633d94167f6e68a.zip
check CLOCK_MONOTONIC is defined
Diffstat (limited to 'src/microspdy')
-rw-r--r--src/microspdy/EXPORT.sym1
-rw-r--r--src/microspdy/internal.c8
2 files changed, 6 insertions, 3 deletions
diff --git a/src/microspdy/EXPORT.sym b/src/microspdy/EXPORT.sym
index eb6604bc..e0bb71ad 100644
--- a/src/microspdy/EXPORT.sym
+++ b/src/microspdy/EXPORT.sym
@@ -1,2 +1,3 @@
1SPDY_start_daemon 1SPDY_start_daemon
2SPDY_stop_daemon 2SPDY_stop_daemon
3SPDYF_monotonic_time
diff --git a/src/microspdy/internal.c b/src/microspdy/internal.c
index 0ba83768..647be05b 100644
--- a/src/microspdy/internal.c
+++ b/src/microspdy/internal.c
@@ -27,12 +27,14 @@
27 27
28 28
29unsigned long long 29unsigned long long
30SPDYF_monotonic_time(void) 30SPDYF_monotonic_time (void)
31{ 31{
32#ifdef HAVE_CLOCK_GETTIME 32#ifdef HAVE_CLOCK_GETTIME
33#ifdef CLOCK_MONOTONIC
33 struct timespec ts; 34 struct timespec ts;
34 if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) 35 if (0 == clock_gettime (CLOCK_MONOTONIC, &ts))
35 return ts.tv_sec * 1000 + ts.tv_nsec / 1000000; 36 return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
36#endif 37#endif
37 return time(NULL) * 1000; 38#endif
39 return time (NULL) * 1000;
38} 40}