def die(self): # TODO: For now this is a memory leak. The object should really die, not just stop the timer. print 'die: %d' % self.entity_id self.attributes['state'] = 'dead' event.modify_timer('entity%d'%self.entity_id,0) self.emit('update')
def modify_timer(self, timer_name, new_interval): print 'modify timer: %s' % timer_name event.modify_timer(timer_name, new_interval)
def modify_timer(self,timer_name,new_interval): print 'modify timer: %s' % timer_name event.modify_timer(timer_name,new_interval)
def stop(self, timer_name): print 'stopping timer: %s' % timer_name event.modify_timer(timer_name, interval=0)
def stop(self,timer_name): print 'stopping timer: %s' % timer_name event.modify_timer(timer_name,interval=0)