Automancer docs



This module provides a simple timer.


This module features a single wait attribute which takes a duration as argument and generates a corresponding process. The process can be paused, resumed and halted without delay.

  - wait: 300 ms
  - wait: 1 hr 5 min
  - wait: ${{ 1.0 * + 5.0 * unit.min }}

The resolution and latency of the timer depend on the Python implementation and platform, as well as the behavior of other modules running in parallel. In practice, the timer will unlikely be more accurate than 100 ms and providing such a low value will produce a warning. Furthermore, it possible that the timer will finish before the provided duration if that difference is within the system clock resolution. A warning will be produced if the observed delay is significantly different than the provided value.

The special keyword forever or an infinite duration can be used to create a timer that never finishes.

  - wait: forever
  - wait: ${{ math.inf * unit.sec }}