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

Question: add_timer function errata?

Forum: Supporting Functions
Date: Mon, 07 Oct 1996 09:45:17 GMT
From: Tim Ferguson <timf@dgs.monash.edu.au>

It seems that when using the add_timer function in newer versions of the kernel (2.0.0+), the `expires' variable in the timer_list struct is the time rather than the length of time before the timer will be processed. To be backward compatible with older versions of linux, you need to do something like:

if the old version was:
   timer.expires = TIME_LENGTH;

new version would be:
   timer.expires = jiffies + TIME_LENGTH;

where TIME_LENGTH is the time in 1/100'ths of a second.

Could anyone tell me if they found this also to be the case, and if so, could the Linux hackers guide please be updated.

    thanks,
             Tim.

Next-in-Thread Next Message Previous Message Next Thread

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

1. Ok: add_timer function errata by Tom Bjorkholm

to: "add_timer function errata?"

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