Искорка,
в примере 10 сек
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(function() {
function guardian_wizard(length, time_limit) {
var obj = window.localStorage.getItem("obj"),
time = (new Date).getTime(),
num = length * Math.random() | 0;
if (obj === null || (obj = JSON.parse(obj),time > obj.time + time_limit) || length != obj.length) obj = {
length: length,
time: time,
num: num
};
window.localStorage.setItem("obj", JSON.stringify(obj));
return obj.num
};
var num = guardian_wizard(25, 10000)//25 длина массива 10 sec сутки ( 24 * 60 * 60 * 1000 )
$("#slider").html(num)
});
</script>
</head>
<body>
<div id="slider"></div>
</body>
</html>