Insert 5 microseconds sleep time each frame.

This shouldn't have any noteable impact on timing (besides the machine
is way too slow for Quake II) and saves a lot of CPU cycles. 100% load
vs. 17% load on my desktop.
This commit is contained in:
Yamagi Burmeister 2017-09-06 17:42:52 +02:00
parent a3ce70d2e3
commit 5ece000c18
1 changed files with 3 additions and 0 deletions

View File

@ -135,6 +135,9 @@ main(int argc, char **argv)
/* The mainloop. The legend. */
while (1)
{
struct timespec t = {0, 5000};
nanosleep(&t, NULL);
newtime = Sys_Microseconds();
Qcommon_Frame(newtime - oldtime);
oldtime = newtime;