How to get current hour (time of day) in linux kernel space
I'm writing a kernel module that checks to see if the time is between two specified hours, and disables input if it is. This has to do with me wanting to make sure I go to bed early. (I know I could also use any number of different techniques including cron etc, but I wanted to learn kernel programming...) As a first version, I therefore check if the current hour is between start and end, which are set via parameters to the module. My question is therefore : How do I get the current hour? I have no access to the usual time functions in the standard library because I am in kernel space. I'm