Implement idle timeout with user-definable time.