aboutsummaryrefslogtreecommitdiffstats
path: root/test/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.c')
-rw-r--r--test/test.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test.c b/test/test.c
index fa2625215..bd39b1371 100644
--- a/test/test.c
+++ b/test/test.c
@@ -182,10 +182,11 @@ void test_wait_threads(void) {
chThdWait(threads[i]);
}
-void test_cpu_pulse(systime_t ms) {
+void test_cpu_pulse(unsigned ms) {
+ systime_t duration = MS2ST(ms);
systime_t start = chSysGetTime();
- while (chSysInTimeWindow(start, start + ms)) {
+ while (chSysInTimeWindow(start, start + duration)) {
#if defined(WIN32)
ChkIntSources();
#endif
@@ -209,11 +210,12 @@ static void tmr(void *p) {
test_timer_done = TRUE;
}
-void test_start_timer(systime_t time) {
+void test_start_timer(unsigned ms) {
+ systime_t duration = MS2ST(ms);
test_timer_done = FALSE;
chSysLock();
- chVTSetI(&vt, time, tmr, NULL);
+ chVTSetI(&vt, duration, tmr, NULL);
chSysUnlock();
}