Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.arcetri.astro.it/irlab/doc/library/linux/khg/HyperNews/get/khg/172/1.html
Дата изменения: Thu Mar 23 12:37:46 2000
Дата индексирования: Wed Sep 15 04:08:20 2010
Кодировка:
Timers Work... The HyperNews Linux KHG Discussion Pages

Timers Work...

Forum: The Linux Kernel Hackers' Guide
Re: Question Timers don't work?? (Joshua Liew)
Keywords: timer
Date: Wed, 03 Dec 1997 01:25:06 GMT
From: Balaji Srinivasan <balaji@hegel.ittc.ukans.edu>

The mistake with your code is that you need to
update INTERVAL every time you add_timer.
The expires field in timer_list is an absolute
time not a relative time.

for example:

irq() {
    timer.expires = jiffies + INTERVAL;
    add_timer(&timer);
}