9fans archive / 1999 / 06 / 47 / prev next From: Chris Pane cpane@met... Subject: [9fans] Hooking up to a timer in a driver Date: Mon, 21 Jun 1999 13:51:16 -0400 Hey all, I have been hunting through the kernel code to try and figure out how to setup a timer in a file system driver I am writing. Here is my problem : I am currently outputting data to a device via my own file system (MIDI). I need a way to have a timer go off in the file system every n Milliseconds, and check my output queue to see if it is time to send the data. Currently I am doing this by spawning a kproc in the driver, and having it sleep for n milliseconds, wake up, check the queue the sleep. Thought this seems to work, it does not seem like the cleanest way to do this. I would like to wire up a handler to a timer mechanism that the OS supports so I could just have the OS call my function every n ticks. I have not been able to find such a thing by searching the source code. Any Clues ? Thanks! -Chris Pane