I'm trying to build my own OpenThread application on two nrf52840 DK borads. When a specific button is pressed I want to start sending udp multicast in a specific time intervall. For now I have achieved that, when the button is pressed, the multicast is sent once. But is there any way that I can periodically send a udp multicast? I thought about using a while loop where the udp_send() methods is called and the some form of thread sleep is called. But I can't seem to find a sleep method that actually works.
Has anybody an idea how to put it into sleep?