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