Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 91f8ea20 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

minor tweaks in status line of gui

parent 6da4b89b
No related branches found
No related tags found
No related merge requests found
......@@ -1570,7 +1570,7 @@ Imports TUGraz.VectoCore.Models.Simulation
String.Format("Starting Simulation ({0} Jobs, {1} Runs)", JobFileList.Count, jobContainer.GetProgress().Count)})
jobContainer.Execute(True)
Dim start As DateTime
Dim start As DateTime = DateTime.Now()
While Not jobContainer.AllCompleted
If sender.CancellationPending Then
jobContainer.Cancel()
......@@ -1578,33 +1578,13 @@ Imports TUGraz.VectoCore.Models.Simulation
End If
Dim progress As Dictionary(Of String, JobContainer.ProgressEntry) = jobContainer.GetProgress()
Dim NumLines As Double = progress.Count
Dim sumProgress As Double = progress.Sum(Function(pair) pair.Value.Progress)
Dim duration As Double = (DateTime.Now() - start).TotalSeconds
If sumProgress > 0 And start = DateTime.MinValue Then
start = DateTime.Now()
End If
Dim sumPercent As Integer = Int(sumProgress/NumLines*100)
Dim progString As String = String.Join(", ", progress.Select(Function(pair) String.Format("{0,4:P}", pair.Value)))
Dim duration As Double = 0.0
Dim remainingDuration As Double = 0
If start > DateTime.MinValue Then
duration = (DateTime.Now() - start).TotalSeconds
remainingDuration = duration/(sumProgress/NumLines) - duration
End If
sender.ReportProgress(sumPercent,
New _
With {.Target = "Status",
.Message = String.Format("Time: {0:0}s, Remaining: {1:0}s, Current Progress: {2:P} ({3})",
duration, remainingDuration, sumPercent/100, progString)
})
sender.ReportProgress(Int(sumProgress/progress.Count*100),
New With {.Target = "Status", .Message = _
String.Format("Duration: {0:0}s, Current Progress: {1:P} ({2})", duration, sumProgress/progress.Count,
String.Join(", ", progress.Select(Function(pair) String.Format("{0,4:P}", pair.Value.Progress))))})
Thread.Sleep(1000)
End While
End Sub
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment