module Concord::Utils

Some helper functions useful in client computations

Public Instance Methods

log_to_stderr(str) click to toggle source

Log message to stderr @param str [String] The message to print to stderr

# File lib/concord/utils.rb, line 13
def log_to_stderr(str)
  $stderr.puts str
  $stderr.flush
end
time_millis(t = Time.now) click to toggle source

Get the time in milliseconds @param t [Time] The time to convert to milliseconds

# File lib/concord/utils.rb, line 7
def time_millis(t = Time.now)
  (t.to_f * 1000.0).to_i
end