Add timestamps to table view

This commit is contained in:
Ladd Hoffman 2023-01-28 10:23:07 -06:00
parent 5834f89882
commit b7280d9946
1 changed files with 3 additions and 0 deletions

View File

@ -93,6 +93,7 @@ export class Scene {
this.middleSection = this.box.addBox('Middle section').flex();
this.box.addBox('Spacer').setInnerHTML(' ');
this.actors = new Set();
this.dateStart = new Date();
mermaid.mermaidAPI.initialize({
startOnLoad: false,
@ -190,7 +191,9 @@ export class Scene {
const row = new Map();
const columns = [];
columns.push({ key: 'seqNum', title: '#' });
columns.push({ key: 'elapsedMs', title: 'Time (ms)' });
row.set('seqNum', this.table.rows.length + 1);
row.set('elapsedMs', new Date() - this.dateStart);
row.set('label', label);
for (const actor of this.actors) {
for (const [aKey, { name, value }] of actor.getValuesMap()) {