This is one way to ensure the delay is always 2 sec since the last mouse movement
This clears/reset the timer when mouse is moving , and sets/starts the timer(delay) when mouse is not moving.
Ockert.