Scheduler.awaitOrTimeout

Similar to await but also has waiting timeout. Calling task will be resumed either if awaited task finished or timeout is hit, whichever happens first.

If task is already scheduled, it will not be re-scheduled again but awaiting will still occur.

class Scheduler
bool
awaitOrTimeout

Parameters

task Task

task to await

micro_seconds uint

timeout duration

Return Value

Type: bool

'true' if resumed via timeout, 'false' otherwise

Meta