SVN compiles here too
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2545 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5a496fe19e
commit
6398316b1f
1 changed files with 22 additions and 1 deletions
|
@ -41,6 +41,27 @@ void Sys_Printf (char *fmt, ...)
|
|||
va_end (argptr);
|
||||
}
|
||||
|
||||
unsigned int Sys_Milliseconds(void)
|
||||
{
|
||||
static int first = true;
|
||||
static unsigned long oldtime = 0, curtime = 0;
|
||||
unsigned long newtime;
|
||||
|
||||
newtime = SDL_GetTicks();
|
||||
|
||||
if (first)
|
||||
{
|
||||
first = false;
|
||||
oldtime = newtime;
|
||||
}
|
||||
if (newtime < oldtime)
|
||||
Con_Printf("Sys_Milliseconds stepped backwards!\n");
|
||||
else
|
||||
curtime += oldtime - newtime;
|
||||
oldtime = newtime;
|
||||
return curtime;
|
||||
}
|
||||
|
||||
//return the current time, in the form of a double
|
||||
double Sys_DoubleTime (void)
|
||||
{
|
||||
|
@ -323,4 +344,4 @@ void Sys_CloseClipboard(char *bf)
|
|||
}
|
||||
void Sys_SaveClipboard(char *text)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue