Module: Concord::Utils
Overview
Some helper functions useful in client computations
Instance Method Summary collapse
-
#log_to_stderr(str) ⇒ Object
Log message to stderr.
-
#time_millis(t = Time.now) ⇒ Object
Get the time in milliseconds.
Instance Method Details
#log_to_stderr(str) ⇒ Object
Log message to stderr
13 14 15 16 |
# File 'lib/concord/utils.rb', line 13 def log_to_stderr(str) $stderr.puts str $stderr.flush end |
#time_millis(t = Time.now) ⇒ Object
Get the time in milliseconds
7 8 9 |
# File 'lib/concord/utils.rb', line 7 def time_millis(t = Time.now) (t.to_f * 1000.0).to_i end |