Class: Time
- Inherits:
-
Object
- Object
- Time
- Defined in:
- lib/timr/ext/time.rb
Overview
Extend core [Time](ruby-doc.org/stdlib-2.4.0/libdoc/time/rdoc/Time.html) class.
Instance Method Summary collapse
-
#to_ms ⇒ Object
See [How do I get elapsed time in milliseconds in Ruby?](stackoverflow.com/questions/1414951/how-do-i-get-elapsed-time-in-milliseconds-in-ruby).
Instance Method Details
#to_ms ⇒ Object
See [How do I get elapsed time in milliseconds in Ruby?](stackoverflow.com/questions/1414951/how-do-i-get-elapsed-time-in-milliseconds-in-ruby)
Not really used. Only to measure the execution from start to end. See ‘bin/timr`.
8 9 10 |
# File 'lib/timr/ext/time.rb', line 8 def to_ms (self.to_f * 1000.0).to_i end |