From e2d6b226da11e130e807bd5c1b54175ae60a649b Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 5 Aug 2014 14:50:12 +0200 Subject: [PATCH] Improved MistIn* player timer accuracy. --- src/input/input.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/input/input.cpp b/src/input/input.cpp index 7544892c..6a5739c8 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -165,14 +165,14 @@ namespace Mist { DEBUG_MSG(DLVL_DONTEVEN,"Pre-While"); - long long int activityCounter = Util::getMS(); - while ((Util::getMS() - activityCounter) < 10000){//10 second timeout - DEBUG_MSG(DLVL_HIGH, "Timer running"); - Util::sleep(1000); + long long int activityCounter = Util::bootSecs(); + while ((Util::getMS() - activityCounter) < 10){//10 second timeout + DEBUG_MSG(DLVL_INSANE, "Timer running"); + Util::wait(1000); removeUnused(); userPage.parseEach(doNothing); if (userPage.amount){ - activityCounter = Util::getMS(); + activityCounter = Util::bootSecs(); DEBUG_MSG(DLVL_HIGH, "Connected users: %d", userPage.amount); } }