mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
Time (Windows): prefers RTL APIs
This commit is contained in:
@@ -89,7 +89,7 @@ FFTimeGetAgeResult ffTimeGetAge(uint64_t birthMs, uint64_t nowMs)
|
||||
static void ffTimeInitQpcMultiplier(void)
|
||||
{
|
||||
LARGE_INTEGER frequency;
|
||||
QueryPerformanceFrequency(&frequency);
|
||||
RtlQueryPerformanceFrequency(&frequency);
|
||||
ffQpcMultiplier = 1000. / (double) frequency.QuadPart;
|
||||
}
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ static inline double ffTimeGetTick(void) //In msec
|
||||
#ifdef _WIN32
|
||||
extern double ffQpcMultiplier;
|
||||
LARGE_INTEGER start;
|
||||
QueryPerformanceCounter(&start);
|
||||
RtlQueryPerformanceCounter(&start);
|
||||
return (double) start.QuadPart * ffQpcMultiplier;
|
||||
#elif defined(__HAIKU__)
|
||||
return (double) system_time() / 1000.;
|
||||
|
||||
@@ -1363,3 +1363,11 @@ NTSYSAPI NTSTATUS NTAPI NtUnmapViewOfSection(
|
||||
_In_ HANDLE ProcessHandle,
|
||||
_In_opt_ PVOID BaseAddress
|
||||
);
|
||||
|
||||
NTSYSAPI LOGICAL NTAPI RtlQueryPerformanceCounter(
|
||||
_Out_ PLARGE_INTEGER PerformanceCounter
|
||||
);
|
||||
|
||||
NTSYSAPI LOGICAL NTAPI RtlQueryPerformanceFrequency(
|
||||
_Out_ PLARGE_INTEGER PerformanceFrequency
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user