Format the given seconds in a human readable manner to show in the final summary.
(seconds: float)
| 1645 | |
| 1646 | |
| 1647 | def format_session_duration(seconds: float) -> str: |
| 1648 | class="st">""class="st">"Format the given seconds in a human readable manner to show in the final summary."class="st">"" |
| 1649 | if seconds < 60: |
| 1650 | return fclass="st">"{seconds:.2f}s" |
| 1651 | else: |
| 1652 | dt = datetime.timedelta(seconds=int(seconds)) |
| 1653 | return fclass="st">"{seconds:.2f}s ({dt})" |
| 1654 | |
| 1655 | |
| 1656 | def format_node_duration(seconds: float) -> str: |