How can I check if the application (VB App only) has been inactive for a certain time (more than 1 minute - because the timer control max value if just abouve i minute).

Is there any API call by which i can keep reading time for say more than 20 minutes and also find if there is no mouse movement for that time. Then i want to fire a idle time check and run a routine on it.

Please help.
Thanx in advance
Nilanjan