From ac8f51cb5262c71f7b4a9f8837f742720bccd5c0 Mon Sep 17 00:00:00 2001 From: Ludwig Ortmann Date: Fri, 28 Nov 2014 13:48:25 +0100 Subject: [PATCH] tests/hwtimer_wait: test smallest value possible By selecting the start value as a multiple of HWTIMER_SPIN_BARRIER+1, the test now includes the smallest non-spinning value. --- tests/hwtimer_wait/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/hwtimer_wait/main.c b/tests/hwtimer_wait/main.c index 17f321249b..70c9f68ac8 100644 --- a/tests/hwtimer_wait/main.c +++ b/tests/hwtimer_wait/main.c @@ -30,7 +30,7 @@ int main(void) puts("When the race condition is hit, the timer will wait for a very very long time."); long iterations = 10000; - long start_duration = 256; + long start_duration = (HWTIMER_SPIN_BARRIER + 1) << 5; long duration = iterations * start_duration * 2L; printf("The test should take about %li sec.\n", (HWTIMER_TICKS_TO_US(duration)/1000000));