def display_value(time)
      case time
      when nil       then '-'
      when 0...1     then '%0ims' % (time * 1000)
      when 1...60    then '%0.02fs' % time
      when 60...3600 then '%dm%02ds' % [time / 60, (time % 60).round]
      else                '%dh%02dm%02ds' % [time / 3600, (time % 3600) / 60, (time % 60).round]
      end
    end
def display_value(time)
      case time
      when nil       then '-'
      when 0...1     then '%0ims' % (time * 1000)
      when 1...60    then '%0.02fs' % time
      when 60...3600 then '%dm%02ds' % [time / 60, (time % 60).round]
      else                '%dh%02dm%02ds' % [time / 3600, (time % 3600) / 60, (time % 60).round]
      end
    end
Display a duration