diff --git a/src/backends/unix/main.c b/src/backends/unix/main.c index ab742309..77ebaaa4 100644 --- a/src/backends/unix/main.c +++ b/src/backends/unix/main.c @@ -38,7 +38,7 @@ qboolean is_portable; int main(int argc, char **argv) { - int time, oldtime, newtime; + long long time, oldtime, newtime; int verLen, i; const char* versionString; @@ -134,7 +134,7 @@ main(int argc, char **argv) /* Do not delay reads on stdin*/ fcntl(fileno(stdin), F_SETFL, fcntl(fileno(stdin), F_GETFL, NULL) | FNDELAY); - oldtime = Sys_Milliseconds(); + oldtime = Sys_Microseconds(); t.tv_sec = 0; /* The legendary Quake II mainloop */ @@ -149,10 +149,10 @@ main(int argc, char **argv) nanosleep(&t, NULL); #endif - newtime = Sys_Milliseconds(); + newtime = Sys_Microseconds(); time = newtime - oldtime; } - while (time < 1); + while (time < 1000); Qcommon_Frame(time); oldtime = newtime; diff --git a/src/common/misc.c b/src/common/misc.c index a5578fe3..046ddd26 100644 --- a/src/common/misc.c +++ b/src/common/misc.c @@ -388,7 +388,7 @@ Qcommon_Frame(int msec) time_between = Sys_Milliseconds(); } - CL_Frame(msec); + CL_Frame(msec / 1000); if (host_speeds->value) {