calvinfo / socket-ntp

NTP Sync using Socket.io
42 stars 6 forks source link

Handling client/server clock differences #2

Closed ilikejames closed 10 years ago

ilikejames commented 10 years ago

See issue #01 on main branch. https://github.com/calvinfo/socket-ntp/issues/1

calvinfo commented 10 years ago

haha, wow - this is some old code... :)

thanks for the fix -- I tested with your patch and it gives the right numbers with

  var now = Date.now;
  Date.now = function () {
    return now() + 8000;
  };

eventually i'd like to make this more modular by converting it to a component and mounted express app