Time a block of code or function, and observe the duration in seconds. Can be used as a function decorator or context manager.
(self)
| 683 | break |
| 684 | |
| 685 | def time(self) -> Timer: |
| 686 | """Time a block of code or function, and observe the duration in seconds. |
| 687 | |
| 688 | Can be used as a function decorator or context manager. |
| 689 | """ |
| 690 | return Timer(self, 'observe') |
| 691 | |
| 692 | def _child_samples(self) -> Iterable[Sample]: |
| 693 | samples = [] |