Hi, playing with Schedule and I'm trying to create...
# arrow
t
Hi, playing with Schedule and I'm trying to create a schedule that waits 15 minutes, performs some task returning Boolean and if false repeats (wait's 15 minutes, performs some task ...).
Copy code
Schedule.identity<Boolean>().delay { Duration.minutes(15) }.whileOutput(::identity)
Unfortunately this executes instantly. Is there a way to create this scheduler (other that putting kotlinx.coroutines.delay in the repeat function)?
s
Skipping the first is not possible atm. Otherwise it could be:
Copy code
Schedule.spaced<Boolean>(Duration.minutes(15)).whileOutput(::identity)
Never-mind, this is isomorphic to
delay
.
t
thanks