- Switch to C++11 steady clock

- Move the C++11 implementation to d_main
- Remove the platform specific timer implementations
This commit is contained in:
Magnus Norddahl 2017-11-12 03:12:22 +01:00
commit 307d8931d8
22 changed files with 174 additions and 560 deletions

View file

@ -68,6 +68,7 @@
#include "intermission/intermission.h"
#include "g_levellocals.h"
#include "events.h"
#include "d_main.h"
EXTERN_CVAR (Int, disableautosave)
EXTERN_CVAR (Int, autosavecount)
@ -956,7 +957,7 @@ void NetUpdate (void)
}
// check time
nowtime = I_GetTime (false);
nowtime = I_GetTime ();
newtics = nowtime - gametime;
gametime = nowtime;
@ -1830,7 +1831,7 @@ void TryRunTics (void)
}
else
{
entertic = I_GetTime (false);
entertic = I_GetTime ();
}
realtics = entertic - oldentertics;
oldentertics = entertic;
@ -1913,7 +1914,7 @@ void TryRunTics (void)
Net_CheckLastReceived (counts);
// don't stay in here forever -- give the menu a chance to work
if (I_GetTime (false) - entertic >= 1)
if (I_GetTime () - entertic >= 1)
{
C_Ticker ();
M_Ticker ();
@ -1928,7 +1929,7 @@ void TryRunTics (void)
hadlate = false;
for (i = 0; i < MAXPLAYERS; i++)
players[i].waiting = false;
lastglobalrecvtime = I_GetTime (false); //Update the last time the game tic'd over
lastglobalrecvtime = I_GetTime (); //Update the last time the game tic'd over
// run the count tics
if (counts > 0)
@ -1961,9 +1962,9 @@ void Net_CheckLastReceived (int counts)
{
// [Ed850] Check to see the last time a packet was received.
// If it's longer then 3 seconds, a node has likely stalled.
if (I_GetTime(false) - lastglobalrecvtime >= TICRATE * 3)
if (I_GetTime() - lastglobalrecvtime >= TICRATE * 3)
{
lastglobalrecvtime = I_GetTime(false); //Bump the count
lastglobalrecvtime = I_GetTime(); //Bump the count
if (NetMode == NET_PeerToPeer || consoleplayer == Net_Arbitrator)
{