@@ -28,23 +28,26 @@ const fileInUrl = require('./file-in-url.js');
2828const getFullWaveQL = require ( './get-full-wave-ql.js' ) ;
2929const parseTimescale = require ( './parse-time-scale.js' ) ;
3030
31- const genStats = ( $ , statPanelDiv ) => async ( e ) => {
32- // console.log('rx: stats', $);
33- const { data} = e . data ;
34- let timeStamp = '?' ;
31+ const getTimeStamp = ( $ ) => {
3532 if ( $ . enddefinitions ) {
3633 const timescaleString = $ . enddefinitions . timescale ;
3734 const m = timescaleString . trim ( ) . match ( / ^ ( \d + ) \s * ( \w + ) $ / ) ;
3835 const time = $ . memI64 [ memmap . time ] * BigInt ( m [ 1 ] ) ;
39- timeStamp = time . toLocaleString ( ) + ' ' + m [ 2 ] ;
40- $ . cnt1 . pstate . time = Number ( time ) ;
36+ return time . toLocaleString ( ) + ' ' + m [ 2 ] ;
4137 }
42- statPanelDiv . innerHTML = stringify ( statusPanel . mlStats ( $ , data , timeStamp ) ) ;
38+ return '?' ;
4339} ;
4440
45- const genLoadVcdDone = ( $ , statPanelDiv ) => async ( ) => {
46- console . log ( 'rx: loadVcdDone' ) ; // eslint-disable-line no-console
47- statPanelDiv . innerHTML = stringify ( statusPanel . mlDone ( ) ) ;
41+ const genStats = ( $ , statPanelDiv ) => async ( e ) => {
42+ // console.log('rx: stats', $);
43+ const { data} = e . data ;
44+ statPanelDiv . innerHTML = stringify ( statusPanel . mlStats ( $ , data , getTimeStamp ( $ ) ) ) ;
45+ } ;
46+
47+ const genLoadVcdDone = ( $ , statPanelDiv ) => async ( e ) => {
48+ // console.log('rx: loadVcdDone'); // eslint-disable-line no-console
49+ const { data} = e . data ;
50+ statPanelDiv . innerHTML = stringify ( statusPanel . mlDone ( $ , data , getTimeStamp ( $ ) ) ) ;
4851 // traceGlPages($);
4952} ;
5053
@@ -148,7 +151,6 @@ const handleVcdParserReady = ($) => async () => {
148151
149152 // cnt1.start(deso);
150153 if ( vcdUrl ) {
151- $ . state . loadVcdT0 = Date . now ( ) ;
152154 $ . vcdromWorker . postMessage ( { cmd : 'loadVcd' , data : vcdUrl } ) ;
153155 }
154156} ;
0 commit comments