MCPcopy
hub / github.com/pytest-dev/pytest / elapsed

Method elapsed

src/_pytest/timing.py:45–47  ·  view source on GitHub ↗

Measure the duration since `Instant` was created.

(self)

Source from the content-addressed store, hash-verified

43 )
44
45 def elapsed(self) -> Duration:
46 """Measure the duration since `Instant` was created."""
47 return Duration(start=self, stop=Instant())
48
49 def as_utc(self) -> datetime:
50 """Instant as UTC datetime."""

Callers 7

runpytest_inprocessMethod · 0.95
runMethod · 0.95
from_callMethod · 0.95
pytest_sessionfinishMethod · 0.80
report_collectMethod · 0.80
summary_statsMethod · 0.80

Calls 2

DurationClass · 0.85
InstantClass · 0.85

Tested by 3

runpytest_inprocessMethod · 0.76
runMethod · 0.76