MCPcopy
hub / github.com/Textualize/rich / TimeElapsedColumn

Class TimeElapsedColumn

rich/progress.py:688–697  ·  view source on GitHub ↗

Renders time elapsed.

Source from the content-addressed store, hash-verified

686
687
688class TimeElapsedColumn(ProgressColumn):
689 """Renders time elapsed."""
690
691 def render(self, task: "Task") -> Text:
692 """Show time elapsed."""
693 elapsed = task.finished_time if task.finished else task.elapsed
694 if elapsed is None:
695 return Text("-:--:--", style="progress.elapsed")
696 delta = timedelta(seconds=max(0, int(elapsed)))
697 return Text(str(delta), style="progress.elapsed")
698
699
700class TaskProgressColumn(TextColumn):

Callers 5

test_time_elapsed_columnFunction · 0.90
test_columnsFunction · 0.90
progress.pyFile · 0.85

Calls

no outgoing calls

Tested by 3

test_time_elapsed_columnFunction · 0.72
test_columnsFunction · 0.72