aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/support/time_posix.c
diff options
context:
space:
mode:
authorGravatar Jorge Canizales <jcanizales@google.com>2015-02-17 19:28:18 -0800
committerGravatar Jorge Canizales <jcanizales@google.com>2015-02-17 19:28:18 -0800
commitdb128617534ace98f7e7e2c4e77d44bd366aae52 (patch)
tree80baba6ac2f9b49a0c1fe32dd04277ed8fcf095a /src/core/support/time_posix.c
parentd1a8cc082acac3a01defa365b1ae98bc40c5ea3a (diff)
parent0a9ae3d23d48667d3fe915b233e4d5cab55be92f (diff)
Merge branch 'master' of https://github.com/grpc/grpc into import-ios-library
Diffstat (limited to 'src/core/support/time_posix.c')
-rw-r--r--src/core/support/time_posix.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/core/support/time_posix.c b/src/core/support/time_posix.c
index 7f0f028183..4af537d974 100644
--- a/src/core/support/time_posix.c
+++ b/src/core/support/time_posix.c
@@ -31,14 +31,6 @@
*
*/
-/* Posix code for gpr time support. */
-
-/* So we get nanosleep and clock_* */
-#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 199309L
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 199309L
-#endif
-
#include <grpc/support/port_platform.h>
#ifdef GPR_POSIX_TIME
@@ -70,7 +62,9 @@ gpr_timespec gpr_now(void) {
}
#else
/* For some reason Apple's OSes haven't implemented clock_gettime. */
-/* TODO(klempner): Add special handling for Apple. */
+
+#include <sys/time.h>
+
gpr_timespec gpr_now(void) {
gpr_timespec now;
struct timeval now_tv;