use is empty
do not use shadow variable
remove sys out
remove sysout
fix string compare, move on the left side
framerate, do not sleep but return sleep time, handle delay for
framwrate < 0
update framerate implementation