Follow up suggested in #36731 (comment).
The first commit fix the timeout on a slow host and the second one use time.monotonic() for durations.
Command to reproduce the errors with a simulated slow wall clock:
faketime --exclude-monotonic -f "+0 x0.1" build/test/functional/interface_ipc_mining.py