File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed
src/visualizers/widgets/ExecutionIndex Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 44define ( [
55 'deepforge/viz/Utils' ,
66 'widgets/LineGraph/LineGraphWidget' ,
7+ './lib/moment.min' ,
78 'text!./ExecTable.html' ,
89 'css!./styles/ExecutionIndexWidget.css'
910] , function (
1011 Utils ,
1112 LineGraphWidget ,
13+ moment ,
1214 TableHtml
1315) {
1416 'use strict' ;
@@ -173,17 +175,7 @@ define([
173175 } ;
174176
175177 ExecutionIndexWidget . prototype . getDurationText = function ( duration ) {
176- var hours ,
177- min ,
178- sec ;
179-
180- sec = duration / 1000 ;
181- hours = Math . floor ( sec / 3600 ) ;
182- sec = sec % 3600 ;
183- min = Math . floor ( sec / 60 ) ;
184- sec = Math . floor ( sec % 60 ) ;
185-
186- return `${ hours } :${ min } :${ sec } ` ;
178+ return moment . duration ( duration ) . humanize ( ) ;
187179 } ;
188180
189181 ExecutionIndexWidget . prototype . updateTime = function ( id , force ) {
You can’t perform that action at this time.
0 commit comments