Dont need this
I_GetPrecise Precision already gets the high res windows time anyways
This commit is contained in:
1 parent
c8d9e4c7b3
commit
03f4bfecc1
1 file changed
-22
@@ -3304,28 +3304,6 @@ void I_SleepDuration(precise_t duration)
|
||||
int status;
|
||||
do status = clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, &ts);
|
||||
while (status == EINTR);
|
||||
#elif defined(_WIN32)
|
||||
LARGE_INTEGER frequency;
|
||||
LARGE_INTEGER start, current;
|
||||
|
||||
QueryPerformanceFrequency(&frequency);
|
||||
QueryPerformanceCounter(&start);
|
||||
|
||||
LONGLONG targetTicks = duration * frequency.QuadPart;
|
||||
|
||||
do {
|
||||
QueryPerformanceCounter(¤t);
|
||||
LONGLONG elapsedTicks = current.QuadPart - start.QuadPart;
|
||||
|
||||
LONGLONG remainingTicks = targetTicks - elapsedTicks;
|
||||
|
||||
LONGLONG remainingTime = remainingTicks / frequency.QuadPart;
|
||||
|
||||
if (remainingTime > 0.001) {
|
||||
Sleep((DWORD)(remainingTime * 1000));
|
||||
}
|
||||
|
||||
} while (current.QuadPart - start.QuadPart < targetTicks);
|
||||
#else
|
||||
UINT64 precision = I_GetPrecisePrecision();
|
||||
INT32 sleepvalue = cv_sleep.value;
|
||||
|
||||
Reference in new issue
Block a user