Skip to content
Snippets Groups Projects
Commit 9a9d294a authored by Oleg Hahm's avatar Oleg Hahm
Browse files

tests: remove sleep from hwtimer test

Instead set hwtimer_wait delay long enough.
parent ffbf20b6
No related branches found
No related tags found
No related merge requests found
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
#include <stdio.h> #include <stdio.h>
#include "hwtimer.h" #include "hwtimer.h"
#include "thread.h"
#define BASE_DELAY (1000UL * 1000UL) #define BASE_DELAY (1000UL * 1000UL)
#define END_DELAY (BASE_DELAY + ((HWTIMER_MAXTIMERS - 1) * DELTA_DELAY))
#define DELTA_DELAY (10UL * 1000UL) #define DELTA_DELAY (10UL * 1000UL)
#define MSGLEN 12 // == strlen("callback %2i") #define MSGLEN 12 // == strlen("callback %2i")
char msg[MSGLEN * HWTIMER_MAXTIMERS]; // == [callback 1\0callback 2\0...] char msg[MSGLEN * HWTIMER_MAXTIMERS]; // == [callback 1\0callback 2\0...]
...@@ -70,9 +70,8 @@ int main(void) ...@@ -70,9 +70,8 @@ int main(void)
puts("All timers set."); puts("All timers set.");
puts(""); puts("");
hwtimer_wait(HWTIMER_TICKS(BASE_DELAY)); hwtimer_wait(HWTIMER_TICKS(END_DELAY));
puts("hwtimer set."); puts("hwtimer set.");
thread_sleep();
return 0; return 0;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment