Skip to content

Commit 1cf3c3c

Browse files
committed
Fix #1503, Change timer start time to improve accuracy
1 parent b50a4b9 commit 1cf3c3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/unit-tests/ostimer-test/ut_ostimer_timerio_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ void UT_os_timerset_test(void)
431431
* is going to vary per system, it may give you the minimum interval, or it may give
432432
* you a very jittery result, or in some cases it could even possibly work.
433433
*/
434-
startTime = 1000;
434+
startTime = g_clkAccuracy*5;
435435
intervalTime = 5;
436436

437437
UtPrintf("\nOS_TimerSet() - #3 Interval-too-short (clk_accuracy=%d)\n", (int)g_clkAccuracy);
@@ -467,7 +467,7 @@ void UT_os_timerset_test(void)
467467
g_timerGlobal.callbackMax = 10;
468468
g_timerGlobal.state = UT_TimerState_INIT;
469469

470-
startTime = 1000;
470+
startTime = g_clkAccuracy*5;
471471
intervalTime = 500000;
472472

473473
UtPrintf("\nOS_TimerSet() - #4 Nominal condition (clk_accuracy=%d)\n", (int)g_clkAccuracy);

0 commit comments

Comments
 (0)