/* All this function ensures is that it will return after usec_to_wait or later.  */
void arch_busy_wait(uint32_t usec_to_wait)
/* All this function ensures is that it will return after usec_to_wait or later.  */
void arch_busy_wait(uint32_t usec_to_wait)
{
	bs_time_t time_end = nsi_hws_get_time() + usec_to_wait;
	while (nsi_hws_get_time() < time_end) {
		nhw_fake_timer_wake_in_time(CONFIG_NATIVE_SIMULATOR_MCU_N, time_end);
		posix_halt_cpu();
	}
}