- def render_runtime_compact duration
- if duration >= DAY
- "#{(duration / DAY.to_f).round(2)} days"
- elsif duration >= HOUR
- "#{(duration / HOUR.to_f).round(2)} hours"
- elsif duration >= MINUTE
- "#{(duration / MINUTE.to_f).round(2)} minutes"
- else
- seconds = duration.round(2)
- "#{seconds} second#{'s' if seconds != 1}"
- end
- end
-