lib/ffi/stat/time_spec.rb in ffi-libfuse-0.0.1.pre vs lib/ffi/stat/time_spec.rb in ffi-libfuse-0.0.1.rctest11
- old
+ new
@@ -102,11 +102,11 @@
# @return [Integer] number of nanoseconds since epoch
def nanos(now = nil)
return nil if omit?
t = now? ? (now || Time.now) : self
- t.tv_sec * 10**9 + t.tv_nsec
+ (t.tv_sec * (10**9)) + t.tv_nsec
end
# Convert to Float
# @param [Time|nil] now
# optional value to use if {now?} is true. If not set then Time.now will be used
@@ -114,10 +114,10 @@
# @return [Float] seconds and fractional seconds since epoch
def to_f(now = nil)
return nil if omit?
t = now? ? (now || Time.now) : self
- t.tv_sec.to_f + t.tv_nsec.to_f / (10**9)
+ t.tv_sec.to_f + (t.tv_nsec.to_f / (10**9))
end
# @!visibility private
def inspect
ns =