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
840}840}
841 841
842void ScriptEngine::run() {842void 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
852 if (DependencyManager::get<ScriptEngines>()->isStopped()) {843 if (DependencyManager::get<ScriptEngines>()->isStopped()) {
853 return; // bail early - avoid setting state in init(), as evaluate() will bail too844 return; // bail early - avoid setting state in init(), as evaluate() will bail too
854 }845 }
@@ -862,6 +853,14 @@ void ScriptEngine::run() { · 7 unmodified lines
862 853
863 QScriptValue result = evaluate(_scriptContents, _fileNameString);854 QScriptValue result = evaluate(_scriptContents, _fileNameString);
864 855
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
865 clock::time_point startTime = clock::now();864 clock::time_point startTime = clock::now();
866 int thisFrame = 0;865 int thisFrame = 0;
867 866