aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-03-10 15:31:58 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-03-10 15:31:58 +0000
commitda4f9beaee8f1f8f344012b4d9a122462a6c802e (patch)
treeecb2cc0d9efd39801f17f8262dc722e48f50456e /test
parenta2bab9c63d848ccfce1440afd40e1eed7b2955ef (diff)
downloadChibiOS-da4f9beaee8f1f8f344012b4d9a122462a6c802e.tar.gz
ChibiOS-da4f9beaee8f1f8f344012b4d9a122462a6c802e.tar.bz2
ChibiOS-da4f9beaee8f1f8f344012b4d9a122462a6c802e.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@827 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test')
-rw-r--r--test/test.c8
-rw-r--r--test/testevt.c2
-rw-r--r--test/testsem.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/test/test.c b/test/test.c
index be3c8d9c5..3be813bb2 100644
--- a/test/test.c
+++ b/test/test.c
@@ -146,7 +146,7 @@ bool_t _test_assert_sequence(char *expected) {
bool_t _test_assert_time_window(systime_t start, systime_t end) {
- return _test_assert(chSysInTimeWindow(start, end), "time window error");
+ return _test_assert(chTimeIsWithin(start, end), "time window error");
}
/*
@@ -171,8 +171,8 @@ void test_wait_threads(void) {
void test_cpu_pulse(unsigned ms) {
systime_t duration = MS2ST(ms);
- systime_t start = chSysGetTime();
- while (chSysInTimeWindow(start, start + duration)) {
+ systime_t start = chTimeNow();
+ while (chTimeIsWithin(start, start + duration)) {
#if defined(WIN32)
ChkIntSources();
#endif
@@ -182,7 +182,7 @@ void test_cpu_pulse(unsigned ms) {
systime_t test_wait_tick(void) {
chThdSleep(1);
- return chSysGetTime();
+ return chTimeNow();
}
/*
diff --git a/test/testevt.c b/test/testevt.c
index 192c6e6be..9c6f7bf6e 100644
--- a/test/testevt.c
+++ b/test/testevt.c
@@ -77,7 +77,7 @@ static void evt1_execute(void) {
chEvtInit(&es2);
chEvtRegisterMask(&es1, &el1, 1);
chEvtRegisterMask(&es2, &el2, 4);
- target_time = chSysGetTime() + MS2ST(50);
+ target_time = chTimeNow() + MS2ST(50);
threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()-1, thread, "A");
m = chEvtWaitAll(5);
test_assert_time_window(target_time, target_time + ALLOWED_DELAY);
diff --git a/test/testsem.c b/test/testsem.c
index 2482f1295..e954871d5 100644
--- a/test/testsem.c
+++ b/test/testsem.c
@@ -86,7 +86,7 @@ static void sem2_execute(void) {
msg= chSemWaitTimeout(&sem1, TIME_IMMEDIATE);
test_assert(msg == RDY_TIMEOUT, "#1");
- target_time = chSysGetTime() + MS2ST(5 * 500);
+ target_time = chTimeNow() + MS2ST(5 * 500);
for (i = 0; i < 5; i++) {
test_emit_token('A' + i);
msg = chSemWaitTimeout(&sem1, MS2ST(500));