X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Ftimer_posix.c;h=c0584f077bcd3009a5b4f075b13f738ec0c0aa87;hb=9c6545aacf8bb77445e7c19e41117d2318d752cc;hp=6d6e36735c167cd3fcd8a78a1b1e26c930873847;hpb=0c1c0408909a3d03a32435bdb3662ee1634d251e;p=bertos.git diff --git a/drv/timer_posix.c b/drv/timer_posix.c old mode 100755 new mode 100644 index 6d6e3673..c0584f07 --- a/drv/timer_posix.c +++ b/drv/timer_posix.c @@ -1,8 +1,33 @@ -/*! +/** * \file * * * \version $Id$ @@ -14,6 +39,12 @@ /*#* *#* $Log$ + *#* Revision 1.6 2006/07/19 12:56:26 bernie + *#* Convert to new Doxygen style. + *#* + *#* Revision 1.5 2006/02/21 21:28:02 bernie + *#* New time handling based on TIMER_TICKS_PER_SEC to support slow timers with ticks longer than 1ms. + *#* *#* Revision 1.4 2006/02/17 22:24:21 bernie *#* Update POSIX timer emulator. *#* @@ -55,11 +86,11 @@ static void timer_hw_init(void) sa.sa_flags = SA_RESTART; sigaction(SIGALRM, &sa, NULL); - // Setup POSIX realtime timer to interrupt every 10ms. + // Setup POSIX realtime timer to interrupt every 1/TIMER_TICKS_PER_SEC. static struct itimerval itv = { - { 0, 1000 / TIMER_TICKS_PER_MSEC }, /* it_interval */ - { 0, 1000 / TIMER_TICKS_PER_MSEC } /* it_value */ + { 0, 1000000 / TIMER_TICKS_PER_SEC }, /* it_interval */ + { 0, 1000000 / TIMER_TICKS_PER_SEC } /* it_value */ }; setitimer(ITIMER_REAL, &itv, NULL); }