screenblank checks BOTH the access and modify time on the devices (usually /dev/kbd and /dev/mouse). When an event occurs on either, a read(2) is done to get the data, and the access time (ls -lu) is updated. screenblank simply watches to see when those times get "old".