class A1516soSpeedTest
Public Class Methods
bmi(w,t)
click to toggle source
# File lib/a1516so_speedtest.rb, line 24 def self.bmi(w,t) puts (w / ((t*0.01)**2)).to_f end
end()
click to toggle source
after calling the start method, by calling the end method, it is possible to measure the processing performed in the meantime.
# File lib/a1516so_speedtest.rb, line 14 def self.end puts Time.now - @@s end
get_age(y,m,d)
click to toggle source
# File lib/a1516so_speedtest.rb, line 18 def self.get_age(y,m,d) m = Date.new(y,m,d).strftime("%Y%m%d").to_i e = Date.today.strftime("%Y%m%d").to_i puts (e - m) / 10000 end
start()
click to toggle source
It will start the time measurement at any time..
# File lib/a1516so_speedtest.rb, line 8 def self.start @@s = Time.now end