See this thread for a 4.x update to InactivityMonitor.