title: Ruby equivalent of Calendar.getInstance().getTimeInMillis() in 64 bits
body: <p>I am using Ruby to generate a 64 bit timestamp similar to Java. I went through <a href="http://www.ruby-doc.org/core-2.0.0/Time.html" rel="nofollow">Class:Time</a> and it says time could use 63 bit integer. I thought I could use:</p>
  
  <pre><code>Time.now.to_f * 1000
  </code></pre>
  
  <p>but I am worried about losing precision due to the floating point conversion. Can I simply get the 64 bit timestamp (millis since epoch) as in Java in ruby, as precise as possible?</p>
  
  <pre><code>Calendar.getInstance().getTimeInMillis();
  </code></pre>
  
  <p>I need to use the timestamp as unique ID in a database, so I would like to keep time-related collisions from minimum to non-existent.</p>