Fix rounding error so IOCP completes on time

pull/3467/head
Craig Tiller 10 years ago
parent 6b5bf16240
commit 114bda1090
  1. 2
      src/core/iomgr/iocp_windows.c

@ -68,7 +68,7 @@ static DWORD deadline_to_millis_timeout(gpr_timespec deadline,
}
timeout = gpr_time_sub(deadline, now);
return gpr_time_to_millis(gpr_time_add(
timeout, gpr_time_from_nanos(GPR_NS_PER_SEC - 1, GPR_TIMESPAN)));
timeout, gpr_time_from_nanos(GPR_NS_PER_MS - 1, GPR_TIMESPAN)));
}
void grpc_iocp_work(grpc_exec_ctx *exec_ctx, gpr_timespec deadline) {

Loading…
Cancel
Save