You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently begin to use spectre.console in my console applications. Begin using the Progress example beacuse I need to display the elapsed time for each of the task that I have, but allways (using ElapsedTimeColumn) and always display the same value and at finished all tasks, all display the same valie)
Here is my goal:
Base on a list of task, every task finished, need to display the time who consume, the total elements procesed (I solve that) and when all finished the accumulated total time.
Actual output:
Reading TUBERIAACERO class ---------------------------------------- 100% (279) (00:00:11.9887527)
Reading TUBERIAP80 class ---------------------------------------- 100% (231564) (00:00:11.9885658)
Reading TUBERIAP100 class ---------------------------------------- 100% (3337) (00:00:11.9885767)
Reading CRUCE class ---------------------------------------- 100% (82125) (00:00:11.9885873)
Reading ACOMETIDA class ---------------------------------------- 100% (226) (00:00:11.9885964)
Reading edge class ---------------------------------------- 100% (100) (00:00:00.0071767)
Also create a custom ProgressColumn
public class TotalColumn : ProgressColumn
{ public override IRenderable Render(RenderOptions options, ProgressTask task, TimeSpan deltaTime)
{
if (task.IsFinished)
{
var total = task.MaxValue.ToString(CultureInfo.DefaultThreadCurrentCulture);
string elapsed = string.Empty;
elapsed = task.ElapsedTime.ToString();
return new Markup($"white ({elapsed})[/]");
}
else
return new Markup("white[/]");
}
}
Any advice? Thanks in advance
This discussion was converted from issue #1632 on September 05, 2024 19:35.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Recently begin to use spectre.console in my console applications. Begin using the Progress example beacuse I need to display the elapsed time for each of the task that I have, but allways (using ElapsedTimeColumn) and always display the same value and at finished all tasks, all display the same valie)
Here is my goal:
Base on a list of task, every task finished, need to display the time who consume, the total elements procesed (I solve that) and when all finished the accumulated total time.
Actual output:
Reading TUBERIAACERO class ---------------------------------------- 100% (279) (00:00:11.9887527)
Reading TUBERIAP80 class ---------------------------------------- 100% (231564) (00:00:11.9885658)
Reading TUBERIAP100 class ---------------------------------------- 100% (3337) (00:00:11.9885767)
Reading CRUCE class ---------------------------------------- 100% (82125) (00:00:11.9885873)
Reading ACOMETIDA class ---------------------------------------- 100% (226) (00:00:11.9885964)
Reading edge class ---------------------------------------- 100% (100) (00:00:00.0071767)
Also create a custom ProgressColumn
public class TotalColumn : ProgressColumn
{ public override IRenderable Render(RenderOptions options, ProgressTask task, TimeSpan deltaTime)
{
if (task.IsFinished)
{
var total = task.MaxValue.ToString(CultureInfo.DefaultThreadCurrentCulture);
string elapsed = string.Empty;
elapsed = task.ElapsedTime.ToString();
return new Markup($"white ({elapsed})[/]");
}
else
return new Markup("white[/]");
}
}
Any advice? Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions