Permalink
Browse files

overlay clock not updating

  • Loading branch information...
Manuel-777 committed Dec 17, 2018
1 parent 63bfca8 commit 4dd99d9afdbac1fe90fc5dec986009d5d4c74805
Showing with 5 additions and 7 deletions.
  1. +2 −2 window_background/labels.js
  2. +3 −5 window_overlay/overlay.js
@@ -635,9 +635,9 @@ function onLabelInEventDeckSubmit(entry, json) {

function onLabelEventMatchCreated(entry, json) {
if (!json) return;
logTime = parseWotcTime(entry.timestamp);
matchBeginTime = parseWotcTime(entry.timestamp);

ipc_send("ipc_log", "MATCH CREATED: "+logTime);
ipc_send("ipc_log", "MATCH CREATED: "+matchBeginTime);
if (json.eventId != "NPE") {
createMatch(json);
}
@@ -58,8 +58,9 @@ function ipc_send(method, arg, to = windowBackground) {
ipc.send('ipc_switch', method, windowOverlay, arg, to);
}


updateClock();
window.setInterval(() => {
updateClock();
}, 250);

function updateClock() {
var hh, mm, ss;
@@ -86,9 +87,6 @@ function updateClock() {
mm = ('0' + mm).slice(-2);
ss = ('0' + ss).slice(-2);
$(".clock_elapsed").html(hh+":"+mm+":"+ss);
setTimeout(function () {
updateClock();
}, 250);
}

//

0 comments on commit 4dd99d9

Please sign in to comment.