File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -235,16 +235,12 @@ def advance_time(self, seconds):
235235 that will complete after all tasks scheduled for after advancement
236236 of time are proceeding.
237237 '''
238- if seconds <= 0 :
239- # cannot go backwards in time, so return after one iteration of a loop
240- return self .create_task (asyncio .sleep (0 ))
241-
242- # advance the clock by the given offset
243- self ._offset += seconds
238+ if seconds > 0 :
239+ # advance the clock by the given offset
240+ self ._offset += seconds
244241
245242 # Once the clock is adjusted, new tasks may have just been
246- # scheduled for running in the next pass through the event loop and
247- # advance again for the newly ready tasks
243+ # scheduled for running in the next pass through the event loop
248244 return self .create_task (asyncio .sleep (0 ))
249245
250246 return ClockEventLoop
You can’t perform that action at this time.
0 commit comments