Use Realtime instead of Monotonic time for CSDS (#25857)

pull/25867/head
Lidi Zheng 4 years ago committed by GitHub
parent ccbb2dd207
commit 720d2d2a65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/core/ext/xds/xds_api.cc

@ -3520,7 +3520,7 @@ google_protobuf_Timestamp* GrpcMillisToTimestamp(const EncodingContext& context,
grpc_millis value) {
google_protobuf_Timestamp* timestamp =
google_protobuf_Timestamp_new(context.arena);
gpr_timespec timespec = grpc_millis_to_timespec(value, GPR_CLOCK_MONOTONIC);
gpr_timespec timespec = grpc_millis_to_timespec(value, GPR_CLOCK_REALTIME);
google_protobuf_Timestamp_set_seconds(timestamp, timespec.tv_sec);
google_protobuf_Timestamp_set_nanos(timestamp, timespec.tv_nsec);
return timestamp;

Loading…
Cancel
Save