allow specifying sleep-* options as string

either as single value or as range: "3.5", "2.1 - 5.0"
This commit is contained in:
Mike Fährmann
2021-12-18 23:04:33 +01:00
parent 0d02a7861e
commit 64cf26eaf4
3 changed files with 43 additions and 6 deletions

View File

@@ -3365,9 +3365,11 @@ Duration
Type
* ``float``
* ``list`` with 2 ``floats``
* ``string``
Example
* ``2.85``
* ``[1.5, 3.0]``
* ``"2.85"``, ``"1.5-3.0"``
Description
A |Duration|_ represents a span of time in seconds.
@@ -3375,6 +3377,8 @@ Description
* If given as a ``list`` with 2 floating-point numbers ``a`` & ``b`` ,
it will be randomly chosen with uniform distribution such that ``a <= N <=b``.
(see `random.uniform() <https://docs.python.org/3/library/random.html#random.uniform>`_)
* If given as a ``string``, it can either represent a single ``float``
value (``"2.85"``) or a range (``"1.5-3.0"``).
Path