Method Windowed
- Namespace
- Eon
- Assembly
- Eon.dll
Windowed(Duration, Func<DateTimeOffset>?)
A Schedule that divides the timeline into `interval`-long windows, and sleeps until the nearest window boundary every time it recurs.
For example, 10 second `interval` would produce a schedule as follows:
10s 10s 10s 10s
|----------|----------|----------|----------|
|action------|sleep---|act|-sleep|action----|
[Pure]
public static Schedule Windowed(Duration interval, Func<DateTimeOffset>? currentTimeFunction = null)
Parameters
interval
DurationSchedule interval
currentTimeFunction
Func<DateTimeOffset>current time function