function formatTime(time, paddedHours) {
  if (!isFinite(time)) return '--:--'

  time = time * 1000
  time = parseInt(time/1000)
  const seconds = time % 60
  time = parseInt(time/60)
  const minutes = time % 60
  time = parseInt(time/60)
  const hours = time % 24
  const days = parseInt(time/24)
  let out = ''
  if (days && days > 0) {
    out += days + ':'
    if (hours < 1) out += '00:'
  }
  if (hours && hours > 0 || paddedHours) out += ('0' + hours).slice(-2) + ':'
  out += ('0' + minutes).slice(-2) + ':'
  out += ('0' + seconds).slice(-2)
  return out.trim()
}
@param {number} time
@param {*=} paddedHours
@returns