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

Class Duration

src/_pytest/timing.py:55–64  ·  view source on GitHub ↗

A span of time as measured by `Instant.elapsed()`.

Source from the content-addressed store, hash-verified

53
54@dataclasses.dataclass(frozen=True)
55class Duration:
56 """A span of time as measured by `Instant.elapsed()`."""
57
58 start: Instant
59 stop: Instant
60
61 @property
62 def seconds(self) -> float:
63 """Elapsed time of the duration in seconds, measured using a performance counter for precise timing."""
64 return self.stop.perf_count - self.start.perf_count
65
66
67@dataclasses.dataclass

Callers 1

elapsedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected