diff --git a/index.html b/index.html index d6d0fe9..3812c41 100644 --- a/index.html +++ b/index.html @@ -11,11 +11,14 @@ +

Fibonacci Clock

+

+

@@ -48,9 +51,35 @@

therealvasanth

+ + function checkTime(i) { + if (i < 10) { + i = "0" + i; + } + return i; + } + + function startTime() { + var today = new Date(); + var h = today.getHours(); + var m = today.getMinutes(); + var s = today.getSeconds(); + // add a zero in front of numbers<10 + m = checkTime(m); + s = checkTime(s); + document.getElementById('time').innerHTML = h + ":" + m + ":" + s; + t = setTimeout(function() { + startTime() + }, 500); + } + startTime(); + + +