diff options
Diffstat (limited to 'src/microspdy/internal.c')
-rw-r--r-- | src/microspdy/internal.c | 8 |
1 files changed, 5 insertions, 3 deletions
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 | ||
29 | unsigned long long | 29 | unsigned long long |
30 | SPDYF_monotonic_time(void) | 30 | SPDYF_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 | } |