title: How to get the current time as 13-digit integer in Ruby?
body: <p>I have this <code>jQuery</code> function that returns the current time as the number of milliseconds since the epoch (Jan 1, 1970):</p>
  
  <pre><code>time = new Date().getTime();
  </code></pre>
  
  <p>Is there a way to do the same in Ruby?</p>
  
  <p>Right now, I am using Ruby's <code>Time.now.to_i</code> which works great but returns a <strong>10-digit</strong> integer (number of seconds)</p>
  
  <p>How can I get it to display the number of milliseconds, as in <code>jQuery</code>?</p>