why do you insist on doing it the hard way? polling every 100 ms IMO won't be any slower from your point of view.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal