var localstor1
var now1
var interval;
interval = window.setInterval(m2, 1000);
function m_start1() {
clearInterval(interval)
interval = window.setInterval(m1, 1000);
now1 = new Date();
now1.setSeconds(now1.getSeconds() + 10);
localStorage.time1 = now1
localstor1 = localStorage.time1
document.getElementById('img1').style.borderColor = 'green';
}
function m1() {
start_time = new Date();
console.log(localStorage.time1)
console.log(start_time)
document.getElementById('img1').style.borderColor = 'yellow';
if (new Date(start_time) >= new Date(localStorage.time1)) {
document.getElementById('img1').style.borderColor = 'red';
}
}