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:
parent
9203115cdc
commit
40812e722e
@ -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:
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user