lib/identity.js
function _getDateMillis (epoc) {
  // Use highres time if available as JS date is +- 15ms
  try {
    var microtime = require('microtime');
    // Time in microsecs, convert to ms
    return (Math.round(microtime.now() / 1000) - epoc.getTime()).toString(2);
  } catch (err) {}

  return ((new Date()) - epoc).toString(2);
}
function _getDateMillis (epoc) {
  // Use highres time if available as JS date is +- 15ms
  try {
    var microtime = require('microtime');
    // Time in microsecs, convert to ms
    return (Math.round(microtime.now() / 1000) - epoc.getTime()).toString(2);
  } catch (err) {}

  return ((new Date()) - epoc).toString(2);
}
function _getDateMillis ( epoc ) { // Use highres time if available as JS date is +- 15ms try { var microtime = require ( 'microtime' ) ; // Time in microsecs, convert to ms return ( Math . round ( microtime . now ( ) / 1000 ) - epoc . getTime ( ) ) . toString ( 2 ) ; } catch ( err ) { } return ( ( new Date ( ) ) - epoc ) . toString ( 2 ) ; }
Get Milliseconds since supplied epoc, using
highres timers if available
@private
@param  {Date} epoc The epoc to use
@return {string}      Milliseconds encoded as bitstring
Get Milliseconds since supplied epoc using highres timers if available