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): def measure(): time.sleep(random.random()) return random.randint(123, 456) pass
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)