The first thing to note is that the timer is stopped while executing the OnTimer() function and started again
once the redraw is finished. The reason for this is to reduce the chance of the program locking up because of
accumulating delays caused by the refresh rate selected by the user being shorter than the time required to
redraw the display. In reality the true refresh rate is not the rate specified by the user, but the time taken to
redraw the display plus the rate specified by the user, this insures that the program does not lockup
especially when running on slow PCs (