Skip to content

Instantly share code, notes, and snippets.

/-

Created September 9, 2015 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/fad3c60b42298b0c86dc to your computer and use it in GitHub Desktop.
Save anonymous/fad3c60b42298b0c86dc to your computer and use it in GitHub Desktop.
diff --git a/sys/xtimer/xtimer_core.c b/sys/xtimer/xtimer_core.c
index 0e1ceaf..0e3a6a7 100644
--- a/sys/xtimer/xtimer_core.c
+++ b/sys/xtimer/xtimer_core.c
@@ -121,8 +121,10 @@ void xtimer_set(xtimer_t *timer, uint32_t offset)
uint32_t target = xtimer_now() + offset;
if (offset < XTIMER_BACKOFF) {
- /* spin until timer should be run */
- xtimer_spin_until(target);
+ if (offset > 1) {
+ /* spin until timer should be run */
+ xtimer_spin_until(target);
+ }
_shoot(timer);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment