Class: A1516soSpeedTest
- Inherits:
-
Object
- Object
- A1516soSpeedTest
- Defined in:
- lib/a1516so_speedtest.rb
Constant Summary collapse
- @@s =
nil
Class Method Summary collapse
- .bmi(w, t) ⇒ Object
-
.end ⇒ Object
after calling the start method, by calling the end method, it is possible to measure the processing performed in the meantime.
- .get_age(y, m, d) ⇒ Object
-
.start ⇒ Object
It will start the time measurement at any time..
Class Method Details
.bmi(w, t) ⇒ Object
24 25 26 |
# File 'lib/a1516so_speedtest.rb', line 24 def self.bmi(w,t) puts (w / ((t*0.01)**2)).to_f end |
.end ⇒ Object
after calling the start method, by calling the end method, it is possible to measure the processing performed in the meantime.
14 15 16 |
# File 'lib/a1516so_speedtest.rb', line 14 def self.end puts Time.now - @@s end |
.get_age(y, m, d) ⇒ Object
18 19 20 21 22 |
# 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 ⇒ Object
It will start the time measurement at any time..
8 9 10 |
# File 'lib/a1516so_speedtest.rb', line 8 def self.start @@s = Time.now end |