module Utils
Public Instance Methods
milliseconds_to_nanoseconds(milliseconds)
click to toggle source
# File lib/rookout/utils.rb, line 10 def milliseconds_to_nanoseconds milliseconds nano = milliseconds * (10**6) nano.to_i end
time_to_nanoseconds(time_obj)
click to toggle source
# File lib/rookout/utils.rb, line 15 def time_to_nanoseconds time_obj secs = time_obj.to_i nsecs = time_obj.nsec (10**9) * secs + nsecs end
uuid()
click to toggle source
# File lib/rookout/utils.rb, line 6 def uuid SecureRandom.uuid.gsub(/-/, "") end