Skip to content

Commit

Permalink
tests/trickle: initialize prev_now in main
Browse files Browse the repository at this point in the history
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:
* RIOT-OS#9052 and proposed fix by ZetaR60
* RIOT-OS/Release-Specs#62 (comment)
  • Loading branch information
cladmi authored and jia200x committed Jun 11, 2018
1 parent cca2122 commit 361b13f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/trickle/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 361b13f

Please sign in to comment.