From 1128177a6f725d1f8c4cba4f7ff6532969109e7a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 18 Jul 2026 03:18:11 +0200 Subject: [PATCH] timeval: rename timer frequency variable It's no longer a global variable. Follow-up to 1027d07704836c8d642abbed34ab98535de47433 #22346 Closes #22347 --- lib/curlx/timeval.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/curlx/timeval.c b/lib/curlx/timeval.c index 7e9f3f71e8..01b20b4da1 100644 --- a/lib/curlx/timeval.c +++ b/lib/curlx/timeval.c @@ -27,24 +27,24 @@ #include "system_win32.h" -static LARGE_INTEGER Curl_freq; +static LARGE_INTEGER s_time_freq; /* For tool or tests, we must initialize before calling curlx_now(). Providing this function here is wrong. */ void curlx_now_init(void) { - QueryPerformanceFrequency(&Curl_freq); + QueryPerformanceFrequency(&s_time_freq); } /* In case of bug fix this function has a counterpart in tool_util.c */ void curlx_pnow(struct curltime *pnow) { LARGE_INTEGER count; - DEBUGASSERT(Curl_freq.QuadPart); + DEBUGASSERT(s_time_freq.QuadPart); QueryPerformanceCounter(&count); - pnow->tv_sec = (time_t)(count.QuadPart / Curl_freq.QuadPart); - pnow->tv_usec = (int)((count.QuadPart % Curl_freq.QuadPart) * 1000000 / - Curl_freq.QuadPart); + pnow->tv_sec = (time_t)(count.QuadPart / s_time_freq.QuadPart); + pnow->tv_usec = (int)((count.QuadPart % s_time_freq.QuadPart) * 1000000 / + s_time_freq.QuadPart); } #elif defined(HAVE_CLOCK_GETTIME_MONOTONIC) || \