From f85e21d23ac82116cc49ac8ddbc3741ea45bb26a Mon Sep 17 00:00:00 2001
From: Kaspar Schleiser <kaspar@schleiser.de>
Date: Sat, 5 Sep 2015 16:21:46 +0200
Subject: [PATCH] tests: xtimer_usleep_until: fix diff calculation

xtimer_usleep_until's internal logic has changed, always setting
&last_wakeup to the expected instead of real value.
In order to make this test output valid values, this commit adapts it.
---
 tests/xtimer_usleep_until/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/xtimer_usleep_until/main.c b/tests/xtimer_usleep_until/main.c
index bea4f407a7..8cf85be150 100644
--- a/tests/xtimer_usleep_until/main.c
+++ b/tests/xtimer_usleep_until/main.c
@@ -37,7 +37,7 @@ int main(void)
         uint32_t last_wakeup = xtimer_now();
         uint32_t before = last_wakeup;
         xtimer_usleep_until(&last_wakeup, (unsigned)interval);
-        uint32_t diff = (last_wakeup-before)-interval;
+        uint32_t diff = (xtimer_now()-before)-interval;
         res[i] = diff;
         interval -= 1;
     }
-- 
GitLab