Make implementation of hwtimer_spin() easier to read and understand