Skip to content

Commit

Permalink
Removed getting next clock event in advance_time_and_run (try to spee…
Browse files Browse the repository at this point in the history
…d things up)
  • Loading branch information
qcapen committed Feb 1, 2016
1 parent e601172 commit b8e36e8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/MpfTestCase.py
Expand Up @@ -14,7 +14,7 @@ def __init__(self, options, config_patches):
self.test_config_patches = config_patches
self.test_init_complete = False
super().__init__(options)
self.clock._max_fps = 1000
self.clock._max_fps = 0

def _load_machine_config(self):
super()._load_machine_config()
Expand Down Expand Up @@ -77,16 +77,12 @@ def advance_time_and_run(self, delta=1.0):
self.machine_run()
end_time = self.machine.clock.get_time() + delta
while True:
next_clock_event = self.machine.clock.get_next_event_time()
next_delay_event = self.machine.delayRegistry.get_next_event()
next_timer = self.machine.timing.get_next_timer()
next_switch = self.machine.switch_controller.get_next_timed_switch_event()
next_show_step = self.machine.show_controller.get_next_show_step()

wait_until = next_clock_event

if not wait_until or (next_delay_event and wait_until > next_delay_event):
wait_until = next_delay_event
wait_until = next_delay_event

if not wait_until or (next_timer and wait_until > next_timer):
wait_until = next_timer
Expand Down

0 comments on commit b8e36e8

Please sign in to comment.