({ elapsedTimeSeconds, timeoutMs }: Props)
| 8 | }; |
| 9 | |
| 10 | export function ShellTimeDisplay({ elapsedTimeSeconds, timeoutMs }: Props): React.ReactNode { |
| 11 | if (elapsedTimeSeconds === undefined && !timeoutMs) { |
| 12 | return null; |
| 13 | } |
| 14 | const timeout = timeoutMs ? formatDuration(timeoutMs, { hideTrailingZeros: true }) : undefined; |
| 15 | if (elapsedTimeSeconds === undefined) { |
| 16 | return <Text dimColor>{`(timeout ${timeout})`}</Text>; |
| 17 | } |
| 18 | const elapsed = formatDuration(elapsedTimeSeconds * 1000); |
| 19 | if (timeout) { |
| 20 | return <Text dimColor>{`(${elapsed} · timeout ${timeout})`}</Text>; |
| 21 | } |
| 22 | return <Text dimColor>{`(${elapsed})`}</Text>; |
| 23 | } |
nothing calls this directly
no test coverage detected