diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-07-01 17:21:01 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-07-01 17:21:01 -0700 |
commit | f3756c1e0d09a90173851a8e8ab4f6342ae8de45 (patch) | |
tree | 34649d67c401175aa59c1e2fcb80ca2e5f08d326 /src/core/transport | |
parent | ef558b321f4f65f37d5579648d5ff606128b60e0 (diff) |
Introduce multiple clocks to GPR
Diffstat (limited to 'src/core/transport')
-rw-r--r-- | src/core/transport/chttp2/parsing.c | 2 | ||||
-rw-r--r-- | src/core/transport/chttp2/stream_encoder.c | 2 | ||||
-rw-r--r-- | src/core/transport/metadata.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 4664a0895c..a11b7e6d36 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -599,7 +599,7 @@ static void on_header(void *tp, grpc_mdelem *md) { } grpc_chttp2_incoming_metadata_buffer_set_deadline( &stream_parsing->incoming_metadata, - gpr_time_add(gpr_now(), *cached_timeout)); + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), *cached_timeout)); grpc_mdelem_unref(md); } else { grpc_chttp2_incoming_metadata_buffer_add(&stream_parsing->incoming_metadata, diff --git a/src/core/transport/chttp2/stream_encoder.c b/src/core/transport/chttp2/stream_encoder.c index cf78ac50cc..db642961ec 100644 --- a/src/core/transport/chttp2/stream_encoder.c +++ b/src/core/transport/chttp2/stream_encoder.c @@ -437,7 +437,7 @@ static void deadline_enc(grpc_chttp2_hpack_compressor *c, gpr_timespec deadline, framer_state *st) { char timeout_str[GRPC_CHTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE]; grpc_mdelem *mdelem; - grpc_chttp2_encode_timeout(gpr_time_sub(deadline, gpr_now()), timeout_str); + grpc_chttp2_encode_timeout(gpr_time_sub(deadline, gpr_now(GPR_CLOCK_REALTIME)), timeout_str); mdelem = grpc_mdelem_from_metadata_strings( c->mdctx, grpc_mdstr_ref(c->timeout_key_str), grpc_mdstr_from_string(c->mdctx, timeout_str)); diff --git a/src/core/transport/metadata.c b/src/core/transport/metadata.c index c80d67823f..4d0d83e7b7 100644 --- a/src/core/transport/metadata.c +++ b/src/core/transport/metadata.c @@ -161,7 +161,7 @@ grpc_mdctx *grpc_mdctx_create(void) { /* This seed is used to prevent remote connections from controlling hash table * collisions. It needs to be somewhat unpredictable to a remote connection. */ - return grpc_mdctx_create_with_seed(gpr_now().tv_nsec); + return grpc_mdctx_create_with_seed(gpr_now(GPR_CLOCK_REALTIME).tv_nsec); } static void discard_metadata(grpc_mdctx *ctx) { |