2013-08-04 12:59:11 +02:00
|
|
|
function update_clock() {
|
2013-10-26 12:59:39 +02:00
|
|
|
var currentTime = projector.get_server_time()
|
2013-08-04 12:59:11 +02:00
|
|
|
var currentHours = currentTime.getHours();
|
|
|
|
var currentMinutes = currentTime.getMinutes();
|
2013-10-22 00:15:45 +02:00
|
|
|
currentHours = normalise(currentHours);
|
|
|
|
currentMinutes = normalise(currentMinutes);
|
2013-08-04 12:59:11 +02:00
|
|
|
$('#currentTime').html(currentHours + ':' + currentMinutes);
|
|
|
|
}
|
2013-10-22 00:15:45 +02:00
|
|
|
|
2013-11-06 14:42:14 +01:00
|
|
|
setInterval('update_clock()', 200);
|
2013-10-26 12:59:39 +02:00
|
|
|
|
2013-10-22 00:15:45 +02:00
|
|
|
function normalise(i) {
|
2013-10-26 12:59:39 +02:00
|
|
|
if (i < 10) {
|
2013-10-22 00:15:45 +02:00
|
|
|
i = "0" + i;
|
|
|
|
}
|
|
|
|
return i;
|
|
|
|
}
|