The HyperNews Linux KHG Discussion Pages
Next-in-Thread Next Message Previous Message Next Thread

Question: Timers don't work??

Forum: The Linux Kernel Hackers' Guide
Keywords: timer
Date: Tue, 02 Dec 1997 21:18:09 GMT
From: Joshua Liew <jliew@pacific.net.sg>

I've been playing around with the add_timer and del_timer functions and can't seem to get it to work. Say if I want to execute a IRQ routine using a 10sec timer for 10 times, only the first time there is a 10 sec delay, but subsiquent interrupts are simultaneous.

static struct timer_list timer = { NULL, NULL, INTERVAL, 0L, &irq };

main() { add_timer(&timer); }

irq() { del_timer(&timer); timer.expires = INTERVAL; add_timer(&timer); printk(KERN_DEBUG "Hello."); }

Is there any documentation on timers? Appreciate all the help I can get. I have a project that needs this and I'm stuck.

Thanks.

Next-in-Thread Next Message Previous Message Next Thread

Messages Inline: 0 1 All Outline: 1 -1 +1

1. None: Timers Work... by Balaji Srinivasan newest

to: "Timers don't work??"

Subscribe Membership Move/Remove Admin Mode Show Frames Help for HyperNews 1.9.4