improve performance

This commit is contained in:
chrys 2016-09-25 22:33:17 +02:00
parent 620321b5da
commit e3bdc1a564

View File

@ -84,7 +84,9 @@ class fenrir():
if len(self.environment['input']['prevDeepestInput']) < len(self.environment['input']['currInput']):
self.wasCommand = command != ''
def handleCommands(self):
def handleCommands(self):
if time.time() - self.environment['commandInfo']['lastCommandExecutionTime'] < 0.2:
return
if not self.environment['runtime']['commandManager'].isCommandQueued():
return
self.environment['runtime']['commandManager'].executeCommand( self.environment['commandInfo']['currCommand'], 'commands')