From 0c1c0408909a3d03a32435bdb3662ee1634d251e Mon Sep 17 00:00:00 2001 From: bernie Date: Fri, 17 Feb 2006 22:24:21 +0000 Subject: [PATCH] Update POSIX timer emulator. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@522 38d2e660-2303-0410-9eaa-f027e97ec537 --- drv/timer.h | 7 +++---- drv/timer_posix.c | 7 +++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drv/timer.h b/drv/timer.h index 3bf12e17..c78bee39 100755 --- a/drv/timer.h +++ b/drv/timer.h @@ -15,6 +15,9 @@ /*#* *#* $Log$ + *#* Revision 1.28 2006/02/17 22:24:21 bernie + *#* Update POSIX timer emulator. + *#* *#* Revision 1.27 2005/11/27 03:04:19 bernie *#* Move test code to timer_test.c; Add OS_HOSTED support. *#* @@ -237,10 +240,6 @@ INLINE void timer_udelay(utime_t delay) } #endif -#if CONFIG_TEST -void timer_test(void); -#endif /* CONFIG_TEST */ - #ifndef CONFIG_TIMER_DISABLE_EVENTS #include diff --git a/drv/timer_posix.c b/drv/timer_posix.c index 542798ab..6d6e3673 100755 --- a/drv/timer_posix.c +++ b/drv/timer_posix.c @@ -14,6 +14,9 @@ /*#* *#* $Log$ + *#* Revision 1.4 2006/02/17 22:24:21 bernie + *#* Update POSIX timer emulator. + *#* *#* Revision 1.3 2006/02/10 12:34:52 bernie *#* Remove spurious EXTERN_C. *#* @@ -55,8 +58,8 @@ static void timer_hw_init(void) // Setup POSIX realtime timer to interrupt every 10ms. static struct itimerval itv = { - { 0, 1000 }, /* it_interval */ - { 0, 1000 } /* it_value */ + { 0, 1000 / TIMER_TICKS_PER_MSEC }, /* it_interval */ + { 0, 1000 / TIMER_TICKS_PER_MSEC } /* it_value */ }; setitimer(ITIMER_REAL, &itv, NULL); } -- 2.25.1