I’m trying to implement the monitor function in Python.
This function must display at regular interval the date followed by the return of the “measure” function. It stops after
cycles executions and the interval will never be less than 1.
The function’s execution time must be less than (cycles + 1) * interval
def monitor(interval=1.0, cycles=42):
return random.randint(123, 456)