The HyperNews Linux KHG Discussion Pages
| Next-in-Thread | Next Response | Previous Response | Next Thread |

Question: add_timer function errata?

Base: Supporting Functions
Date: Mon, 07 Oct 1996 09:45:17 GMT
From: timf@dgs.monash.edu.au (Tim Ferguson)

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.


No Responses

a Response to: "add_timer function errata?"

| Next-in-Thread | Next Response | Previous Response | Next Thread |
| Notification | Copy/Move/Delete | Admin Mode |
| Membership | Help for HyperNews 1.9B5.6 | Frames |