Skip to content

Commit

Permalink
Separate main tick loop from effects (#59)
Browse files Browse the repository at this point in the history
<!-- LIST CHANGES HERE -->
  • Loading branch information
norwd authored Oct 28, 2024
2 parents 6a7acaa + 9ebc6aa commit 3a54b33
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
ThisTimeStamp - Testing
</title>
<script type="text/javascript">
function tick() {
function refreshClockFace() {
var clockFace = document.getElementById("clockFace");
clockFace.innerHTML = new Date().toString();
setTimeout(tick);
}

function tick() {
refreshClockFace();
setTimeout(tick, 1000 * 0.3);
}

document.addEventListener("DOMContentLoaded", tick);
Expand Down

0 comments on commit 3a54b33

Please sign in to comment.