From 361b13f0f776371155ba3e7b61c3744a8396c73c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Fri, 11 May 2018 17:51:19 +0200 Subject: [PATCH] tests/trickle: initialize prev_now in main Having `prev_now` initialized to 0 breaks tests on `arduino-zero` and `arduino-mega2560` as `xtimer_now_usec` is way bigger (72k on `arduino-zero`). Issue found in: * #9052 and proposed fix by ZetaR60 * https://github.com/RIOT-OS/Release-Specs/issues/62#issuecomment-387421737 --- tests/trickle/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/trickle/main.c b/tests/trickle/main.c index cf3cf2a9aac1e..79ce6f44fa040 100644 --- a/tests/trickle/main.c +++ b/tests/trickle/main.c @@ -60,6 +60,7 @@ int main(void) { msg_t msg; unsigned counter = 0; + prev_now = xtimer_now_usec(); trickle_start(sched_active_pid, &trickle, TRICKLE_MSG, TR_IMIN, TR_IDOUBLINGS, TR_REDCONST);