DelayPolicy

sealed interface DelayPolicy

Encapsulates a delay duration for agent operations.

Normalizes coarse-grained Delay enum values and raw millisecond values into a plain millisecond Long, so consumers never need to perform their own enum-to-milliseconds lookups.

Serialized as a plain millisecond Long value via millis. A Duration view is available via duration for callers that require it.

Use DelayPolicy.Inherit when the action should inherit the enclosing agent's delay. Use DelayPolicy.of factory methods to construct from a Delay level or raw milliseconds.

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Fixed(val millis: Long) : DelayPolicy

A fixed delay of millis milliseconds.

Link copied to clipboard

Sentinel meaning "not set / inherit from the enclosing agent scope".

Properties

Link copied to clipboard
open val duration: Duration
Link copied to clipboard
abstract val millis: Long