OpenSlides/openslides/projector/static/js/clock.js
Emanuel Schuetze d8d2ad002a Rename and clean up static direcories.
- rename static subdirs to css and js
- move global static dir to core/static, changed
- move global templates dir to core/templates
- check comments and code style of all our own CSS and JS files
- minor changes related to the changes of template and static files
2014-01-14 23:27:12 +01:00

23 lines
502 B
JavaScript

/*
* JavaScript functions for clock.
*
*/
function update_clock() {
var currentTime = projector.get_server_time()
var currentHours = currentTime.getHours();
var currentMinutes = currentTime.getMinutes();
currentHours = normalise(currentHours);
currentMinutes = normalise(currentMinutes);
$('#currentTime').html(currentHours + ':' + currentMinutes);
}
setInterval('update_clock()', 200);
function normalise(i) {
if (i < 10) {
i = "0" + i;
}
return i;
}