add nonblocking check for keypress
get rid of division by zero for frame rendering in < 1 ms
make benchmark more useful
move main loop to separate function with callback
update example test code