Created
February 3, 2018 15:09
-
-
Save jugyo/9b6d79ce4ca91c8e37448a331f2d2564 to your computer and use it in GitHub Desktop.
Time#milliseconds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Time | |
unless Time.method_defined?(:milliseconds) | |
def milliseconds | |
(to_f * 1000).to_i | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment