From 64108302fc23e0c3e7a649c90edd8eaf71932635 Mon Sep 17 00:00:00 2001 From: cpsdqs Date: Fri, 27 Oct 2017 14:18:11 +0200 Subject: [PATCH] Show last screen update in debug toolbar --- js/term/debug.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/term/debug.js b/js/term/debug.js index 958381b..a22c75a 100644 --- a/js/term/debug.js +++ b/js/term/debug.js @@ -383,6 +383,7 @@ module.exports = function attachDebugger (screen, connection) { }, drawing: { title: 'Drawing', + 'Last Update': '', 'Show Updates': showUpdates, 'Fancy Graphics': fancyGraphics, 'Redraw Screen': () => { @@ -457,6 +458,8 @@ module.exports = function attachDebugger (screen, connection) { Hanging: screen.cursor.hanging }) + let drawTime = Math.round((drawData.endTime - drawData.startTime) * 100) / 100 + toolbarData.drawing['Last Update'] = `${drawData.reason} (${drawTime}ms)` toolbarData.drawing['Fancy Graphics'].checked = !!screen.layout.window.graphics for (let i in toolbarData) {