/* Can be used to emulate code execution time.  */
void posix_cpu_hold(uint32_t usec_to_waste)
/* Can be used to emulate code execution time.  */
void posix_cpu_hold(uint32_t usec_to_waste)
{
	uint64_t time_start;
	int64_t to_wait = usec_to_waste;
	while (to_wait > 0) {
		time_start = hwm_get_time();
		hwtimer_wake_in_time(time_start + to_wait);
		posix_change_cpu_state_and_wait(true);
		to_wait -= hwm_get_time() - time_start;
		posix_irq_handler();
	}
}