smarter-clock
Description: Run to get a synced up time to passed in ntp servers. Runs an average of delta values from ntp server and your local clock to get more accurate over time
##Getting Started
npm install @smarterservices/smarterclock
var smarterclock = require('@smarterservices/smarterclock')
var config = {
tickRate: 'numarical value for requesting ntp time i.e 60000=ever minute', //required
arrayLimit: 'set the max size your array of delta values can be'
ntpServers:[{server:'server address',port:'port for server'}]//array of server address and ports
}
var clock = new smarterclock(config)
####Methods:
clock.getSyncTime()
returns synced time based on delta values between server and your local time (unix mill)
clock.syncTime()
will pull ntp time once and add a delta value to delta array
clock.shiftServer()
will shift the server you use to upll your ntp times if more servers in array