1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys: xtimer: use relative spin in absolute set functions

This commit is contained in:
Kaspar Schleiser 2015-09-14 17:06:46 +02:00
parent 9203115cdc
commit 40812e722e
2 changed files with 2 additions and 6 deletions

View File

@ -80,7 +80,7 @@ void xtimer_usleep_until(uint32_t *last_wakeup, uint32_t interval) {
mutex_lock(&mutex);
}
else {
xtimer_spin_until(target);
xtimer_spin(offset);
}
out:

View File

@ -123,11 +123,7 @@ 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);
}
xtimer_spin(offset);
_shoot(timer);
}
else {