Messages in this thread | | | Date | Thu, 2 Oct 2003 14:59:28 -0400 (EDT) | From | "Richard B. Johnson" <> | Subject | Re: getting timestamp of last interrupt? |
| |
On Thu, 2 Oct 2003, Hans-Georg Thien wrote:
> I am looking for a possibility to read out the last timestamp when an > interrupt has occured. > > e.g.: the user presses a key on the keyboard. Where can I read out the > timestamp of this event?
You can get A SIGIO signal for every keyboard, (or other input) event. What you do with it is entirely up to you. Linux/Unix doesn't have "callbacks", instead it has signals. It also has select() and poll(), all useful for handling such events. If you want a time-stamp, you call gettimeofday() in your signal handler.
Cheers, Dick Johnson Penguin : Linux version 2.4.22 on an i686 machine (797.90 BogoMips). Note 96.31% of all statistics are fiction.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |