TaskScheduler

Best-effort scheduler for low-priority tasks on a single thread.

Scheduled tasks are wrapped in a try/catch to ensure that exceptions do not suppress subsequent executions of repeating tasks (a behavior of ScheduledExecutorService).

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun schedule(delay: Duration = 0.seconds, action: () -> Unit): ScheduledFuture<*>
Link copied to clipboard
fun scheduleRepeating(period: Duration, initialDelay: Duration = 0.seconds, taskName: String, action: () -> Unit): ScheduledFuture<*>