necesito que si a los 5 min de inactividad se redirija una web a google tengo el siguiente script
funtion time(){
tiempo_resta:500seg;
location.replace("https://www.GOOGLE.com");
}
seria algo como de html esto lo que necesito pero en JS
<meta http-equiv="refresh" content="500; url=http://www.google.com/">
Pregunto como se hace en JS?