class sleep.SleepAction(time=1, environment_id=None)

Bases: actions.action.Action

Defines the SleepAction - causes the engine to pause before sending a packet.

__init__(time=1, environment_id=None)

Initializes the sleep action.

  • time (float) – How much time the packet should delay before sending
  • environment_id (str, optional) – Environment ID of the strategy this action is a part of
parse(string, logger)

Parses a string representation for this object.

run(packet, logger)

The sleep action simply passes along the packet it was given with an instruction for how long the engine should sleep before sending it.

frequency = 0