i need to write a programm which checks every milisecond for new data through an ioport.
In the meantime it has to do some calculations, but getting the data MUST have priority.
I tried it with setitimer() and ITIMER_VIRTUAL calling every milisecond a sighandler function, but this fails.
/edit : the function gets called but sometimes after more than a miliseconda
So i wanted to ask whether there could be a better way to do this. The programm runs using root rights