[lkml]   [2003]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: getting timestamp of last interrupt?
Richard B. Johnson wrote:

> On Mon, 6 Oct 2003, Hans-Georg Thien wrote:
>>I'm writing a kernel mode device driver (mouse).
>>In that device driver I need the timestamp of the last event for another
>>kernel mode device (keyboard).
>>I do not care if that timestamp is in jiffies or in gettimeofday()
>>format or whatever format does exist in the world. I am absolutely sure
>>I can convert it somehow to fit my needs.
>>But since it is a kernel mode driver it can not -AFAIK- use the signal()
> Then it gets real simple. Just use jiffies, if you can stand the [...]
I fear that there is still some miss-understanding. Jiffies are totally
OK for me. I can use them without any conversion.

I'll try to formulate the problem with some other words:

I hope that there is is something like a "jiffie-counter" for the
keyboard driver, that stores the actual jiffies value whenever a
keyboard interrupt occurs.

I hope too, that there is a way to query that "jiffie-counter" from
another kernel driver, so that I can write something like


void mouse_event(){

// get the current time in jiffies
int now=jiffies;

// get the jiffie value of the last kbd event
int last_kbd_event= ????; // ... but how to do that ...

if ((now - last_kbd_event) > delay) {


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:49    [W:0.056 / U:3.084 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site