5 seconds in settimeout code example
Example 1: delay in javascript
setTimeout(function() {
//your code here
}, 1000);
Example 2: javascript run something after x seconds
setTimeout(function(){
location.reload();
}, 3000); //run this after 3 seconds