created function

created function for the set interval to 30 fps
setInterval for continued function call until clearInterval is called
ID value for return by setInterval