(duration_secs=4)
| 10 | |
| 11 | |
| 12 | def busy_task(duration_secs=4): |
| 13 | print(f" Task: Starting busy work for ~{duration_secs} seconds...") |
| 14 | start_time = time.perf_counter() |
| 15 | while time.perf_counter() - start_time < duration_secs: |
| 16 | # Simulate some CPU work |
| 17 | # for _ in range(100000): # Adjust complexity as needed |
| 18 | # pass |
| 19 | time.sleep(2) |
| 20 | end_time = time.perf_counter() |
| 21 | print(f" Task: Finished busy work in {end_time - start_time:.2f} seconds.") |
| 22 | |
| 23 | |
| 24 | max_rounds = 20 # Safety break for the loop |
no outgoing calls
no test coverage detected
searching dependent graphs…