mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-01 10:21:59 +02:00
[Utils] fixing rounding issues in time display
Prevent getting strings like "5m60s" when rounding up.
This commit is contained in:
parent
9a09310f07
commit
7abbb50302
4 changed files with 53 additions and 36 deletions
|
@ -34,7 +34,7 @@ Panel {
|
|||
else {
|
||||
timer.stop()
|
||||
if (node !== null && (node.isFinishedOrRunning() || globalStatus == "ERROR")) {
|
||||
computationInfo.text = Format.getTimeStr(node.elapsedTime)
|
||||
computationInfo.text = Format.sec2timeStr(node.elapsedTime)
|
||||
}
|
||||
else{
|
||||
computationInfo.text = ""
|
||||
|
@ -57,7 +57,7 @@ Panel {
|
|||
nodeStartDateTime = new Date(node.getStartDateTime()).getTime()
|
||||
}
|
||||
var now = new Date().getTime()
|
||||
parent.text = Format.getTimeStr((now-nodeStartDateTime)/1000)
|
||||
parent.text = Format.sec2timeStr((now-nodeStartDateTime)/1000)
|
||||
}
|
||||
}
|
||||
padding: 2
|
||||
|
@ -75,7 +75,7 @@ Panel {
|
|||
if (node !== null && (node.isFinishedOrRunning() || (node.isSubmittedOrRunning() && node.elapsedTime > 0))) {
|
||||
var longestChunkTime = getLongestChunkTime(node.chunks)
|
||||
if (longestChunkTime > 0)
|
||||
return "Longest chunk: " + Format.getTimeStr(longestChunkTime) + " (" + node.chunks.count + " chunks)"
|
||||
return "Longest chunk: " + Format.sec2timeStr(longestChunkTime) + " (" + node.chunks.count + " chunks)"
|
||||
else
|
||||
return ""
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue