olbrich/ruby-units — Issue #34: at() method in Time class should take optional second argument
Author: scpike
Created: 2012-01-12 18:04:09+00:00
State: open

Ruby-units overrides the Time class's at() method with a new on that only accepts one argument.

The standard time class accepts an optional second microseconds method
http://ruby-doc.org/core-1.9.3/Time.html

I think it would be enough to add a second optional milliseconds argument to your at() method and pass it through to the unit_time_at call in the else{} block, but I'm not totally sure.

def self.at(arg, ms = 0)
case arg
when Unit
unit_time_at(arg.convert_to("s").scalar)
else
unit_time_at(arg, ms)
end
end