git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7712 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
fbd65c1f6a
commit
e2d1dd382a
|
@ -196,28 +196,28 @@ static void thd4_execute(void) {
|
|||
chThdSleepMicroseconds(100000);
|
||||
test_assert_time_window(1,
|
||||
time + US2ST(100000),
|
||||
time + US2ST(100000) + CH_CFG_ST_TIMEDELTA);
|
||||
time + US2ST(100000) + CH_CFG_ST_TIMEDELTA + 1);
|
||||
|
||||
/* Timeouts in milliseconds.*/
|
||||
time = chVTGetSystemTime();
|
||||
chThdSleepMilliseconds(100);
|
||||
test_assert_time_window(2,
|
||||
time + MS2ST(100),
|
||||
time + MS2ST(100) + CH_CFG_ST_TIMEDELTA);
|
||||
time + MS2ST(100) + CH_CFG_ST_TIMEDELTA + 1);
|
||||
|
||||
/* Timeouts in seconds.*/
|
||||
time = chVTGetSystemTime();
|
||||
chThdSleepSeconds(1);
|
||||
test_assert_time_window(3,
|
||||
time + S2ST(1),
|
||||
time + S2ST(1) + CH_CFG_ST_TIMEDELTA);
|
||||
time + S2ST(1) + CH_CFG_ST_TIMEDELTA + 1);
|
||||
|
||||
/* Absolute timelines.*/
|
||||
time = chVTGetSystemTime() + MS2ST(100);
|
||||
chThdSleepUntil(time);
|
||||
test_assert_time_window(4,
|
||||
time,
|
||||
time + CH_CFG_ST_TIMEDELTA);
|
||||
time + CH_CFG_ST_TIMEDELTA + 1);
|
||||
}
|
||||
|
||||
ROMCONST struct testcase testthd4 = {
|
||||
|
|
Loading…
Reference in New Issue