diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 4474464829..09df3531c5 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -25,9 +25,6 @@ class ShowBase: self.wantDIRECT = self.config.GetBool('want-directtools', 0) self.wantStats = self.config.GetBool('want-stats', 0) - # Set a maximum frame rate on the render loop (0 means do not limit) - Task.maxFps = self.config.GetInt('max-fps', 120) - import Loader self.initialState = NodeAttributes() diff --git a/direct/src/task/Task.py b/direct/src/task/Task.py index 7284fa34a7..67a4876017 100644 --- a/direct/src/task/Task.py +++ b/direct/src/task/Task.py @@ -8,10 +8,6 @@ exit = -1 done = 0 cont = 1 -# Note: this is dconfig'ed in ShowBase.py, but Tasks want to be independent -# of ShowBase and panda, so we have to set an initial value here -maxFps = 120 - # Store the global clock globalClock = ClockObject.getGlobalClock() @@ -269,15 +265,7 @@ class TaskManager: self.running = 1 while self.running: try: - startTime = globalClock.getRealTime() self.step() - finishTime = globalClock.getRealTime() - # Max out the frame rate so we do not starve the cpu - if (maxFps > 0): - dt = finishTime - startTime - length = (1.0/maxFps)-dt - if (length > 0): - time.sleep(length) except KeyboardInterrupt: self.stop() except: