I wrote a bash script (and somewhat later, a Javascript version) where you press a key and when you release it the timer starts, effectively getting you to sleep just 15 (or whatever) minutes. Also prevented taking more than a set amount of minutes between falling asleep and sleeping. It works pretty well, as long as you sleep close enough to a real keyboard (for Bash) or an iOS device (haven't tested the JS solution in other than Mobile Safari)