diff --git a/src/FPS.cpp b/src/FPS.cpp index 305f764..c07fe15 100644 --- a/src/FPS.cpp +++ b/src/FPS.cpp @@ -2,7 +2,7 @@ #include FPS::FPS() { - previousFrame = high_resolution_clock::now(); + previousFrame = system_clock::now(); timeSinceUpdate = nanoseconds(0); framesSinceUpdate = 0; current = 0; @@ -15,7 +15,7 @@ FPS::FPS() { void FPS::newFrame() { framesSinceUpdate++; - auto thisFrame = high_resolution_clock::now(); + auto thisFrame = system_clock::now(); timeSinceUpdate += thisFrame - previousFrame; previousFrame = thisFrame; } diff --git a/src/Simulation.cpp b/src/Simulation.cpp index c076a03..ab787ad 100644 --- a/src/Simulation.cpp +++ b/src/Simulation.cpp @@ -11,7 +11,7 @@ Simulation::Simulation() { QTimer::connect(timer, &QTimer::timeout, this, &Simulation::update); timer->setInterval(updateInterval); timer->start(); - lastUpdate = high_resolution_clock::now(); + lastUpdate = system_clock::now(); }; void Simulation::draw(QPainter *p, int screenSize) { @@ -22,7 +22,7 @@ void Simulation::draw(QPainter *p, int screenSize) { } void Simulation::update() { - auto thisUpdate = high_resolution_clock::now(); + auto thisUpdate = system_clock::now(); auto ms = (int)duration_cast(thisUpdate - lastUpdate).count(); lastUpdate = thisUpdate;