History

cleanup accidental change

Brad Hefta-Gaub committed 9 years ago

Commit 4b9345d1 parent 84eca011 file · +8 −9Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+8−9
@@ -840,15 +840,6 @@ QScriptValue ScriptEngine::evaluate(const QString& sourceCode, const QString& fi · 839 unmodified lines
840840 }
841841
842842 void ScriptEngine::run() {
843−
844−#ifdef _WIN32
845− // VS13 does not sleep_until unless it uses the system_clock, see:
846− // https://www.reddit.com/r/cpp_questions/comments/3o71ic/sleep_until_not_working_with_a_time_pointsteady/
847− using clock = std::chrono::system_clock;
848−#else
849− using clock = std::chrono::high_resolution_clock;
850−#endif
851−
852843 if (DependencyManager::get<ScriptEngines>()->isStopped()) {
853844 return; // bail early - avoid setting state in init(), as evaluate() will bail too
854845 }
@@ -862,6 +853,14 @@ void ScriptEngine::run() { · 7 unmodified lines
862853
863854 QScriptValue result = evaluate(_scriptContents, _fileNameString);
864855
856+#ifdef _WIN32
857+ // VS13 does not sleep_until unless it uses the system_clock, see:
858+ // https://www.reddit.com/r/cpp_questions/comments/3o71ic/sleep_until_not_working_with_a_time_pointsteady/
859+ using clock = std::chrono::system_clock;
860+#else
861+ using clock = std::chrono::high_resolution_clock;
862+#endif
863+
865864 clock::time_point startTime = clock::now();
866865 int thisFrame = 0;
867866