StartEndTask

constructor(onStart: Runnable, onEnd: Runnable)

Create a new StartEndTask with no timeout.

Parameters

onStart

the callback to run when the task starts

onEnd

the callback to run when the task finishes


constructor(timeoutSeconds: Measure<Time>, onStart: Runnable, onFinish: Runnable)

Create a new StartEndTask with a timeout.

Parameters

timeoutSeconds

the timeout for the task

onStart

the callback to run when the task starts

onFinish

the callback to run when the task finishes