New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@smarterservices/smarterclock

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smarterservices/smarterclock

store of delta values between ntp time and local time to get an accurate sync time

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by125%
Maintainers
4
Weekly downloads
 
Created
Source

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.getTime()

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		

clock.getDelta(callback)
will add delta to this.delta array and return current delta to callback if passed	

Keywords

FAQs

Package last updated on 17 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc