From f50020ce038411b2a0864cb61296b67ac1cc032e Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 8 Aug 2016 07:29:31 -0700 Subject: Appease the const gods, improve readability, stop using 0 and 1 as proxies for false and true. --- test/cpp/qps/client_sync.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/cpp/qps/client_sync.cc') diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index 53e004ffa0..8062424a1f 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -82,12 +82,12 @@ class SynchronousClient // WaitToIssue returns false if we realize that we need to break out bool WaitToIssue(int thread_idx) { if (!closed_loop_) { - gpr_timespec next_issue_time = NextIssueTime(thread_idx); + const gpr_timespec next_issue_time = NextIssueTime(thread_idx); // Avoid sleeping for too long continuously because we might // need to terminate before then. This is an issue since // exponential distribution can occasionally produce bad outliers while (true) { - gpr_timespec one_sec_delay = + const gpr_timespec one_sec_delay = gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(1, GPR_TIMESPAN)); if (gpr_time_cmp(next_issue_time, one_sec_delay) <= 0) { -- cgit v1.2.3