quantify_scheduler.helpers.time

Python time wrapper functions. These function help to make time dependent modules testable.

Module Contents

Functions

get_time(→ float)

Return the time in seconds since the epoch as a floating point number.

sleep(→ None)

Delay execution for a given number of seconds. The argument may be a floating point

get_time() float[source]

Return the time in seconds since the epoch as a floating point number.

Acts as a wrapper around time.time() in order to make it testable. Mocking time.time() can conflicts with the internal python ticker thread.

Returns

Time since epoch

sleep(seconds: float) None[source]

Delay execution for a given number of seconds. The argument may be a floating point number for subsecond precision.

Parameters

seconds – The amount of time to wait.