<How to repeat empty Mono with (roughly) constant ...
# stackoverflow
u
How to repeat empty Mono with (roughly) constant delays between attempts? How to repeat empty Mono with (roughly) constant delays between attempts so that it subtracts time spent executing Mono from the delay? I tried this val delay = Duration.ofSeconds(5) var count = 0 val res = Mono.defer { Mono.fromCallable { count++ }.flatMap { c -> println("${Instant.now()}: $c") if (c < 3) { // Thread.sleep(2000) Mono.delay(Duration.ofMillis(1000)).then() // Mono.empty() } else...