mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-21 11:21:52 +00:00
Make the Linux / Unix backend year 2038 compliant.
This commit is contained in:
parent
e869223e7f
commit
406857f57a
1 changed files with 3 additions and 4 deletions
|
@ -84,18 +84,17 @@ Sys_Milliseconds(void)
|
|||
{
|
||||
struct timeval tp;
|
||||
struct timezone tzp;
|
||||
static int secbase;
|
||||
static long secbase;
|
||||
|
||||
gettimeofday(&tp, &tzp);
|
||||
|
||||
if (!secbase)
|
||||
{
|
||||
secbase = tp.tv_sec;
|
||||
return tp.tv_usec / 1000;
|
||||
return (int)(tp.tv_usec / 1000);
|
||||
}
|
||||
|
||||
curtime = (tp.tv_sec - secbase) * 1000 + tp.tv_usec / 1000;
|
||||
|
||||
curtime = (int)((tp.tv_sec - secbase) * 1000 + tp.tv_usec / 1000);
|
||||
return curtime;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue