To be fair, this is pretty hard. Imagine you had to do to sit down and write this without being able to test it.
let lastms
function tick() {
if (lastms === undefined)
lastms = new Date().getMilliseconds()
else if (lastms !== new Date().getMilliseconds())
throw new Error('Drifted')
}
setInterval(tick, 1000)Here is the fix for the "GPT-2" version:
.hand {
top: 48.5%;
}
.hour-hand {
left: 20%;
}
.minute-hand {
left: 10%;
}
.second-hand {
left: 5%;
}