Look at now before sleeping (#28996)

pull/28998/head
Craig Tiller 3 years ago committed by GitHub
parent bbe49dc16b
commit 95270af6b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/core/lib/gpr/sync_posix.cc

@ -130,6 +130,7 @@ int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu, gpr_timespec abs_deadline) {
#if GPR_LINUX
abs_deadline = gpr_convert_clock_type(abs_deadline, GPR_CLOCK_MONOTONIC);
#else
abs_deadline = gpr_time_max(abs_deadline, gpr_now(abs_deadline.clock_type));
abs_deadline = gpr_convert_clock_type(abs_deadline, GPR_CLOCK_REALTIME);
#endif // GPR_LINUX
abs_deadline_ts.tv_sec = static_cast<time_t>(abs_deadline.tv_sec);

Loading…
Cancel
Save