/* Sleep for some ms. Timeouts are processed while sleeping. */
void sys_msleep(u32_t ms)
/* Sleep for some ms. Timeouts are processed while sleeping. */
void sys_msleep(u32_t ms)
{
  sys_sem_t delaysem = sys_sem_new(0);
  sys_sem_wait_timeout(delaysem, ms);
  sys_sem_free(delaysem);
}