aboutsummaryrefslogtreecommitdiffstats
path: root/test/rt/source/test/rt_test_sequence_006.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/rt/source/test/rt_test_sequence_006.c')
-rw-r--r--test/rt/source/test/rt_test_sequence_006.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/rt/source/test/rt_test_sequence_006.c b/test/rt/source/test/rt_test_sequence_006.c
index 14aa2dd78..4b4ec262f 100644
--- a/test/rt/source/test/rt_test_sequence_006.c
+++ b/test/rt/source/test/rt_test_sequence_006.c
@@ -71,7 +71,7 @@ void test_cpu_pulse(unsigned duration) {
systime_t start, end, now;
start = chThdGetTicksX(chThdGetSelfX());
- end = start + TIME_MS2I(duration);
+ end = chTimeAddX(start, TIME_MS2I(duration));
do {
now = chThdGetTicksX(chThdGetSelfX());
#if defined(SIMULATOR)
@@ -358,7 +358,8 @@ static void rt_test_006_002_execute(void) {
time windows (100mS...100mS+ALLOWED_DELAY).*/
test_set_step(3);
{
- test_assert_time_window(time + TIME_MS2I(100), time + TIME_MS2I(100) + ALLOWED_DELAY,
+ test_assert_time_window(chTimeAddX(time, TIME_MS2I(100)),
+ chTimeAddX(time, TIME_MS2I(100) + ALLOWED_DELAY),
"out of time window");
}
}
@@ -430,7 +431,8 @@ static void rt_test_006_003_execute(void) {
time windows (110mS...110mS+ALLOWED_DELAY).*/
test_set_step(3);
{
- test_assert_time_window(time + TIME_MS2I(110), time + TIME_MS2I(110) + ALLOWED_DELAY,
+ test_assert_time_window(chTimeAddX(time, TIME_MS2I(110)),
+ chTimeAddX(time, TIME_MS2I(110) + ALLOWED_DELAY),
"out of time window");
}
}