We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d13b7bb commit 00b92f4Copy full SHA for 00b92f4
evutil_time.c
@@ -71,6 +71,9 @@ typedef void (WINAPI *GetSystemTimePreciseAsFileTime_fn_t) (LPFILETIME);
71
int
72
evutil_gettimeofday(struct timeval *tv, struct timezone *tz)
73
{
74
+ static GetSystemTimePreciseAsFileTime_fn_t GetSystemTimePreciseAsFileTime_fn = NULL;
75
+ static int check_precise = 1;
76
+
77
#ifdef _MSC_VER
78
#define U64_LITERAL(n) n##ui64
79
#else
@@ -93,9 +96,6 @@ evutil_gettimeofday(struct timeval *tv, struct timezone *tz)
93
96
if (tv == NULL)
94
97
return -1;
95
98
- static GetSystemTimePreciseAsFileTime_fn_t GetSystemTimePreciseAsFileTime_fn = NULL;
- static int check_precise = 1;
-
99
if (EVUTIL_UNLIKELY(check_precise)) {
100
HMODULE h = evutil_load_windows_system_library_(TEXT("kernel32.dll"));
101
if (h != NULL)
0 commit comments