Budget#

class council.runners.Budget(duration: float)[source]#

Bases: object

Represents the budget available for the execution

duration#

The number of seconds

Type:

float

__init__(duration: float)[source]#

Initialize the Budget object

Parameters:

duration (float) – The number of seconds

static default() Budget[source]#

Helper function that create a new Budget with a default value.

Returns:

Budget

is_expired() bool[source]#

Check if the budget is expired :returns: True is the budget is expired. Otherwise False

remaining() Budget[source]#

Create a new instance with the remaining budget

Returns:

a new instance with the remaining budget