Detect if mouse is still?

Hi

Is there a way to detect if the mouse is still ?

Basically I want my animation to play if nobody is at the computer for a few seconds.

Maybe I should do this the other way saying the it the animation plays unless someone moves the mouse ?

Thanks
David