title: How to time an operation in milliseconds in Ruby?
body: <p>I'm wishing to figure out how many milliseconds a particular function uses. So I looked high and low, but could not find a way to get the time in Ruby with millisecond precision. </p>
  
  <p>How do you do this? In most programming languages its just something like</p>
  
  <pre><code>start = now.milliseconds
  myfunction()
  end = now.milliseconds
  time = end - start
  </code></pre>