Skip to content
Snippets Groups Projects
Commit 12ae02e1 authored by Jarrod Pas's avatar Jarrod Pas
Browse files

Adds tick event function to TickProcess

parent b5256c4b
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ class Process:
def process(self, *args):
raise NotImplementedError
yield None
class TickProcess(Process):
......@@ -16,6 +17,9 @@ class TickProcess(Process):
super().__init__()
if tick < 1:
raise ValueError('tick must be greatert than or equal to 1')
self.tick = tick
self.__tick = tick
def tick(self):
return self.env.timeout(self.__tick)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment