Skip to content
Snippets Groups Projects
Commit cb0337d7 authored by Kaspar Schleiser's avatar Kaspar Schleiser
Browse files

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

parent 5a485c3f
No related branches found
No related tags found
No related merge requests found
...@@ -121,8 +121,10 @@ void xtimer_set(xtimer_t *timer, uint32_t offset) ...@@ -121,8 +121,10 @@ void xtimer_set(xtimer_t *timer, uint32_t offset)
uint32_t target = xtimer_now() + offset; uint32_t target = xtimer_now() + offset;
if (offset < XTIMER_BACKOFF) { if (offset < XTIMER_BACKOFF) {
/* spin until timer should be run */ if (offset > 1) {
xtimer_spin_until(target); /* spin until timer should be run */
xtimer_spin_until(target);
}
_shoot(timer); _shoot(timer);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment