mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 13:33:26 +02:00
cleanup accidental change
This commit is contained in:
parent
84eca0159e
commit
4b9345d7c6
1 changed files with 8 additions and 9 deletions
|
@ -840,15 +840,6 @@ QScriptValue ScriptEngine::evaluate(const QString& sourceCode, const QString& fi
|
|||
}
|
||||
|
||||
void ScriptEngine::run() {
|
||||
|
||||
#ifdef _WIN32
|
||||
// VS13 does not sleep_until unless it uses the system_clock, see:
|
||||
// https://www.reddit.com/r/cpp_questions/comments/3o71ic/sleep_until_not_working_with_a_time_pointsteady/
|
||||
using clock = std::chrono::system_clock;
|
||||
#else
|
||||
using clock = std::chrono::high_resolution_clock;
|
||||
#endif
|
||||
|
||||
if (DependencyManager::get<ScriptEngines>()->isStopped()) {
|
||||
return; // bail early - avoid setting state in init(), as evaluate() will bail too
|
||||
}
|
||||
|
@ -862,6 +853,14 @@ void ScriptEngine::run() {
|
|||
|
||||
QScriptValue result = evaluate(_scriptContents, _fileNameString);
|
||||
|
||||
#ifdef _WIN32
|
||||
// VS13 does not sleep_until unless it uses the system_clock, see:
|
||||
// https://www.reddit.com/r/cpp_questions/comments/3o71ic/sleep_until_not_working_with_a_time_pointsteady/
|
||||
using clock = std::chrono::system_clock;
|
||||
#else
|
||||
using clock = std::chrono::high_resolution_clock;
|
||||
#endif
|
||||
|
||||
clock::time_point startTime = clock::now();
|
||||
int thisFrame = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue