Return the duration since the given start time. Accounts for buggy platforms where time.monotonic() is not monotonic. See PYTHON-4600.
(start: float)
| 55 | |
| 56 | |
| 57 | def _monotonic_duration(start: float) -> float: |
| 58 | """Return the duration since the given start time. |
| 59 | |
| 60 | Accounts for buggy platforms where time.monotonic() is not monotonic. |
| 61 | See PYTHON-4600. |
| 62 | """ |
| 63 | return max(0.0, time.monotonic() - start) |
| 64 | |
| 65 | |
| 66 | class MonitorBase: |
no outgoing calls
no test coverage detected