AFAIK mouseevents.dll only performs events not tell you when they occur.

You may be able to use a /timer and $mouse.x and $mouse.y to get an idea of how long the mouse has been idle.