index.js
function timeDiff(newest, oldest) {
  var diff = (parseFloat(newest) - parseFloat(oldest));
  if (diff < 0) {
    diff = ((10000 + parseFloat(newest)) - parseFloat(oldest));
  }
  return diff;
}
function timeDiff(newest, oldest) {
  var diff = (parseFloat(newest) - parseFloat(oldest));
  if (diff < 0) {
    diff = ((10000 + parseFloat(newest)) - parseFloat(oldest));
  }
  return diff;
}
function timeDiff ( newest , oldest ) { var diff = ( parseFloat ( newest ) - parseFloat ( oldest ) ) ; if ( diff < 0 ) { diff = ( ( 10000 + parseFloat ( newest ) ) - parseFloat ( oldest ) ) ; } return diff ; }
The timestamps we get are artificilly limited to 10 seconds. They might wrap around, so take that in to account
The timestamps we get are artificilly limited to 10 seconds . They might wrap around so take that in to account