Clearification on Documentation `event::Event::Periodic`
Skarlett opened this issue · 1 comments
Periodic(Duration, Option<Duration>)
Periodic events rely upon two parameters: a period and an optional phase.If the phase is None, then the event will first fire in one period. Periodic events repeat automatically so long as the action in >>> EventData returns None.
It's a bit vague, but I think I understand it best with the SongFade
example. The phase
is the initial waiting period before firing period
at the interval specificed in a period.
I think this can be described better as
Periodic(Duration, Option<Duration>)
Periodic events rely upon two parameters: a period and an optional phase.If the phase is None, then the event will first fire in one period. Periodic events repeat automatically so long as the action in >>> EventData returns None.
Otherwise if phase is present, then the duration of the phase is completed before firing the first period.
The terms period
and phase
probably should be better defined, and perhaps an illustration outlining the event timeline will satisfy
I agree that this is a little unclear. An ASCII diagram or similar would go a long way!