mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-21 00:41:05 +00:00
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:
parent
a3ce70d2e3
commit
5ece000c18
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue