add a frame per second reg

add a frame per second reg in the print function and fixed the lag with
a buffer like handling method and noticed an issue with what it decides
to draw or not with the example code from the HTML file...