Sha256: 72de3c2c528568a5c58e873e28599c8674a1b11c80fe65f4e274241b0ac29504

Contents?: true

Size: 376 Bytes

Versions: 6

Compression:

Stored size: 376 Bytes

Contents

class Numeric
  def milliseconds
    UnderOs::Timer::Duration.new(self.to_f / 1000)
  end

  alias :ms :milliseconds

  def seconds
    UnderOs::Timer::Duration.new(self)
  end

  def minutes
    UnderOs::Timer::Duration.new(self * 60)
  end

  def hours
    UnderOs::Timer::Duration.new(self * 3600)
  end

  def days
    UnderOs::Timer::Duration.new(self * 86400)
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
under-os-core-1.4.0 lib/core/numeric.rb
under-os-1.3.0 lib/under_os/core/numeric.rb
under-os-1.2.1 lib/under_os/core/numeric.rb
under-os-1.2.0 lib/under_os/core/numeric.rb
under-os-1.1.0 lib/under_os/core/numeric.rb
under-os-1.0.0 lib/under_os/core/numeric.rb