Package-level declarations

Types

Link copied to clipboard
value class Pulse

A Pulse is a cadence which informs consumers when to execute work by calling Pulse.beat.

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun Clock.delayFor(period: DateTimePeriod, timeZone: TimeZone)

Suspend the coroutine for period in timeZone without blocking the thread.

Link copied to clipboard
suspend fun Clock.delayUntil(instant: Instant)

Suspend the coroutine until instant without blocking the thread. If Clock.now is greater than instant, this function returns immediately.

suspend fun Clock.delayUntil(dateTime: LocalDateTime, timeZone: TimeZone)

Suspend the coroutine until dateTime in timeZone without blocking the thread. If Clock.now is greater than the Instant associated with dateTime and timeZone, this function returns immediately.

Link copied to clipboard
suspend fun Clock.delayUntilNext(time: LocalTime, timeZone: TimeZone)

Suspend the coroutine until the next occurance of time in timeZone without blocking the thread.

Link copied to clipboard
fun Clock.intervalPulse(interval: Duration): Pulse

Return a Pulse which beats every interval. The returned Pulse will delay prior to its first Pulse.beat.

fun Clock.intervalPulse(period: DateTimePeriod, timeZone: TimeZone): Pulse

Return a Pulse which beats every period in timeZone. The returned Pulse will delay prior to its first Pulse.beat.

Link copied to clipboard
fun Clock.schedulePulse(timeZone: TimeZone = TimeZone.UTC, atSecond: Int? = null, atMinute: Int? = null, atHour: Int? = null, onDayOfMonth: Int? = null, inMonth: Month? = null): Pulse

Schedule a Pulse whose beats occur atSecond, atMinute, atHour, onDayOfMonth, and inMonth for a specific timeZone.