Skip to main content

tdiff

Calculates the difference between the current monotonic time and a provided timestamp.

def tdiff(
then: float
) - > float

Calculates the elapsed time in seconds between a previous monotonic timestamp and the current time.

Parameters​

NameTypeDescription
thenfloatA previous timestamp obtained from time.monotonic() to compare against the current time.

Returns​

TypeDescription
floatThe time difference in seconds since the provided monotonic timestamp.