sys: xtimer: xtimer_set(): shoot directly if offset <= 1

This commit is contained in:
Kaspar Schleiser 2015-09-09 17:27:59 +02:00
parent 5a485c3f73
commit cb0337d77e

View File

@ -121,8 +121,10 @@ void xtimer_set(xtimer_t *timer, uint32_t offset)
uint32_t target = xtimer_now() + offset;
if (offset < XTIMER_BACKOFF) {
if (offset > 1) {
/* spin until timer should be run */
xtimer_spin_until(target);
}
_shoot(timer);
}