Skip to content

Commit 5dcd0f7

Browse files
author
Filip Jagodzinski
committed
Prevent sleep during watchdog lower limit test
1 parent fe68506 commit 5dcd0f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

TESTS/mbed_hal/watchdog_timing/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ void test_timeout_lower_limit()
154154
// Watchdog should not trigger before timeout * clock accuracy.
155155
// If device restarts while waiting for the kick, test fails.
156156

157-
ThisThread::sleep_for(sleep_time_ms);
157+
wait_us(sleep_time_ms * 1000);
158158
hal_watchdog_kick();
159159

160160
if (send_reset_notification(&current_case, 2 * TIMEOUT_LOWER_LIMIT_MS) == false) {
@@ -164,7 +164,7 @@ void test_timeout_lower_limit()
164164
hal_watchdog_kick();
165165

166166
// Watchdog should fire before twice the timeout value.
167-
ThisThread::sleep_for(2 * TIMEOUT_LOWER_LIMIT_MS);
167+
wait_us(2 * TIMEOUT_LOWER_LIMIT_MS * 1000);
168168

169169
// Watchdog reset should have occurred during that wait() above;
170170

0 commit comments

Comments
 (0)