diff options
author | Craig Tiller <ctiller@google.com> | 2015-11-06 16:05:30 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-11-06 16:05:30 -0800 |
commit | bdffdc04f840f340409177de628e3885c81cff6d (patch) | |
tree | d1695897a1dcf921102be30239e3a3c2cd6b2eab /src | |
parent | faa291824cb8b545658ec57bd9a5b45895fa2a18 (diff) | |
parent | 04f4054546ccc794fa59e8e989bba14142d50495 (diff) |
Merge pull request #4031 from jtattermusch/win_precise_clock
Use QueryPerformanceCounter as precise clock for windows
Diffstat (limited to 'src')
-rw-r--r-- | src/core/support/time_win32.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/support/time_win32.c b/src/core/support/time_win32.c index bc0586d069..623a8d9233 100644 --- a/src/core/support/time_win32.c +++ b/src/core/support/time_win32.c @@ -66,14 +66,12 @@ gpr_timespec gpr_now(gpr_clock_type clock) { now_tv.tv_nsec = now_tb.millitm * 1000000; break; case GPR_CLOCK_MONOTONIC: + case GPR_CLOCK_PRECISE: QueryPerformanceCounter(×tamp); now_dbl = (timestamp.QuadPart - g_start_time.QuadPart) * g_time_scale; now_tv.tv_sec = (time_t)now_dbl; now_tv.tv_nsec = (int)((now_dbl - (double)now_tv.tv_sec) * 1e9); break; - case GPR_CLOCK_PRECISE: - gpr_precise_clock_now(&now_tv); - break; } return now_tv; } |