curltime: use libcurl time functions in src and tests/server

The curl tool and tests/server used 2 parallel implementations
of libcurl's `Curl_now()` and `Curl_timediff()` functions.

Make them use the libcurl one.

Closes #16653
This commit is contained in:
Viktor Szakats 2025-03-09 13:14:31 +01:00
parent b1faac8039
commit 436d4a360a
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
20 changed files with 129 additions and 292 deletions

View file

@ -732,21 +732,9 @@ static void init_terminal(void)
}
#endif
LARGE_INTEGER tool_freq;
bool tool_isVistaOrGreater;
CURLcode win32_init(void)
{
/* curlx_verify_windows_version must be called during init at least once
because it has its own initialization routine. */
if(curlx_verify_windows_version(6, 0, 0, PLATFORM_WINNT,
VERSION_GREATER_THAN_EQUAL))
tool_isVistaOrGreater = true;
else
tool_isVistaOrGreater = false;
QueryPerformanceFrequency(&tool_freq);
curlx_now_init();
#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
init_terminal();
#endif