Revert "Merge ../gzdoom"

This reverts commit ee7ea6b9a2, reversing
changes made to c04b50c41f.
This commit is contained in:
Rachael Alexanderson 2017-11-15 22:36:47 -05:00
parent 277ad1e6ed
commit 556974441e

View file

@ -38,8 +38,6 @@
#include <stdint.h>
#include "i_time.h"
#include "doomdef.h"
#include "c_cvars.h"
#include "doomstat.h"
//==========================================================================
//
@ -51,30 +49,10 @@ static uint64_t FirstFrameStartTime;
static uint64_t CurrentFrameStartTime;
static uint64_t FreezeTime;
static double TimeScale = 1.0;
CUSTOM_CVAR(Float, i_timescale, 1.0f, CVAR_NOINITCALL)
{
if (netgame && self != 1.0f)
{
Printf("Time scale cannot be changed in net games.\n");
self = 1.0f;
}
else
{
I_FreezeTime(true);
float clampValue = (self < 0.05) ? 0.05 : self;
if (self != clampValue)
self = clampValue;
TimeScale = self;
I_FreezeTime(false);
}
}
static uint64_t GetClockTimeNS()
{
using namespace std::chrono;
return (uint64_t)duration_cast<nanoseconds>(steady_clock::now().time_since_epoch()).count() * TimeScale;
return (uint64_t)duration_cast<nanoseconds>(steady_clock::now().time_since_epoch()).count();
}
static uint64_t MSToNS(unsigned int ms)