- Companion
- class
Type members
Value members
Concrete methods
Creates a new unconnected delay.
Creates a new unconnected delay.
In order to specify the action taken after the delay, the apply
method can be used,
e.g. Delay(1.0)(PrintLn("After one second"))
. That is equivalent to writing
val d = Delay(1.0); d ---> PrintLn("After one second"); d
.
'''Note:''' There is currently a subtle difference with disposal. If a runner goes into
Stop
state, the delay is cancelled and disposed. If a runner goes into Done
state,
the delay is '''not''' cancelled. This also affects Action
objects. We will determine
in the future whether this behavior is to be kept, or delays are always disposed upon
done
.
- Value Params
- time
Delay time in seconds. Negative numbers are clipped to zero.