]> git.sesse.net Git - remoteglot/commitdiff
Stop the barrage of clock timer events if one of the players went out on time.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 29 Dec 2022 19:28:11 +0000 (20:28 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 29 Dec 2022 19:28:11 +0000 (20:28 +0100)
www/js/remoteglot.js

index 42990ad0001ee6e716bba308ce4c901cdfe3f1cd..15ea31cbe72840eda30cb4491699a3b0d5906fd7 100644 (file)
@@ -1598,7 +1598,7 @@ function update_clock() {
        // This matches what DGT clocks do.
        let show_seconds = (white_clock_ms < 60 * 20 * 1000 || black_clock_ms < 60 * 20 * 1000);
 
-       if (color) {
+       if (color && remaining_ms > 0) {
                // See when the clock will change next, and update right after that.
                let next_update_ms;
                if (show_seconds) {