X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Ftimer_posix.c;h=6d6e36735c167cd3fcd8a78a1b1e26c930873847;hb=ef9091677fa3d4fb9f903fcb5debe52d5b52a8cf;hp=c97593c88335ee42afd3f79b541cb314de08f597;hpb=85c1ab406a633641eeadc7d093d68c6f3ef10642;p=bertos.git diff --git a/drv/timer_posix.c b/drv/timer_posix.c index c97593c8..6d6e3673 100755 --- a/drv/timer_posix.c +++ b/drv/timer_posix.c @@ -14,6 +14,12 @@ /*#* *#* $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. + *#* *#* Revision 1.2 2006/01/16 03:30:21 bernie *#* Make header C++ friendly. *#* @@ -37,7 +43,7 @@ void timer_isr(int); /// HW dependent timer initialization. -EXTERN_C static void timer_hw_init(void) +static void timer_hw_init(void) { struct sigaction sa; memset(&sa, 0, sizeof(sa)); @@ -52,8 +58,8 @@ EXTERN_C 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); }