tests: improve calculation in hwtimer_wait

Kudos to @Kijewski
Merge pull request #1628 from LudwigOrtmann/hwtimer_wait_fixup_2

tests: improve calculation in hwtimer_wait