Quote:
When I remove this code my program runs normally.
You forgot to tell what is the problem with this code.
Quote:
Trying to create a simple timer but cannot get it to work.
As far as I can see, this code only hog CPU. Its problem is that its speed is different on every computer and with today computers, it will be so fast you will barely see something.
As of today every computer offer some efficient timing service which is used for every anime you see, even video.
Window setInterval() Method[
^]