Commit 0eebc506 by Tobias Langer

Fixed error.

parent a726d4c4
......@@ -55,11 +55,14 @@ def lcm(a, b):
return (a * b) / gcd(a, b)
def hyperperiod(tasks):
try:
periods = [task.period for task in tasks]
hyperperiod = periods[0]
for period in periods[1:]:
hyperperiod = lcm(hyperperiod, period)
return hyperperiod
except IndexError:
return 0
class Timebase(Enum):
seconds = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment