( durationInput: Duration.DurationInput )
| 675 | |
| 676 | /** @internal */ |
| 677 | export const duration = ( |
| 678 | durationInput: Duration.DurationInput |
| 679 | ): Schedule.Schedule<Duration.Duration> => { |
| 680 | const duration = Duration.decode(durationInput) |
| 681 | const durationMillis = Duration.toMillis(duration) |
| 682 | return makeWithState(true as boolean, (now, _, state) => |
| 683 | core.succeed( |
| 684 | state |
| 685 | ? [ |
| 686 | false, |
| 687 | duration, |
| 688 | ScheduleDecision.continueWith(Interval.after(now + durationMillis)) |
| 689 | ] as const |
| 690 | : [false, Duration.zero, ScheduleDecision.done] as const |
| 691 | )) |
| 692 | } |
| 693 | |
| 694 | /** @internal */ |
| 695 | export const either = dual< |
no test coverage detected