Instead of sleeping, use the `IOS` TaskScheduler - see the MQTT adapter in the extensions. (Remember to cancel the `ScheduledFuture` if not null).