diff --git a/editor/placedocument.cpp b/editor/placedocument.cpp index 3e5db93..3ed1253 100644 --- a/editor/placedocument.cpp +++ b/editor/placedocument.cpp @@ -4,6 +4,7 @@ #include "mainglwidget.h" #include "mainwindow.h" #include "objects/service/script/scriptcontext.h" +#include #include #include #include @@ -43,7 +44,7 @@ private: gWorkspace()->PhysicsStep(float(deltaTime)/1'000'000); } - std::this_thread::sleep_for(std::chrono::milliseconds(33 - deltaTime/1000)); + std::this_thread::sleep_for(std::chrono::microseconds(16'667 - deltaTime)); std::unique_lock lock(sync); runningCond.wait(lock, [&]{ return running || quit; });