Sha256: 0f60bb5f85ec6088ba6ecd3131b9b3a70f271d03c98ef3cce6852bbeeca6d942

Contents?: true

Size: 171 Bytes

Versions: 4

Compression:

Stored size: 171 Bytes

Contents

class Float
  def to_human_time
    case self
      when 0..1 then "#{(self * 1000).floor} msecs"
      when 1..2 then "1 sec"
      else "#{floor} secs"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
httping-1.3.0 lib/extensions/float.rb
httping-1.1.0 lib/extensions/float.rb
httping-1.0.1 lib/extensions/float.rb
httping-1.0.0 lib/extensions/float.rb