ID EN
Time

perf_counter

Python 3.11

Return the value (in fractional seconds) of a performance counter, i.e. a clock with the highest available resolution to measure a short duration. It does include time elapsed during sleep and is system-wide. The reference point of the returned value is undefined, so that only the difference between the results of two calls is valid.

Syntax

PYTHON
time.perf_counter() → float

See Also

perf_counter_ns() float