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
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smarterservices/smarterclock - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

index.js

@@ -15,3 +15,3 @@ var smarterClock = function (config) {

//tickrate for getting delta from ntp server
this.tickRate = config.syncDelay || 10;
this.tickRate = config.syncDelay || 60;
// set the tickRate to milliseconds.

@@ -18,0 +18,0 @@ this.tickRate = this.tickRate * 1000;

{
"name": "@smarterservices/smarterclock",
"version": "2.0.0",
"_args": [
[
{
"raw": "@smarterservices/smarterclock@2.0.0",
"scope": "@smarterservices",
"escapedName": "@smarterservices%2fsmarterclock",
"name": "@smarterservices/smarterclock",
"rawSpec": "2.0.0",
"spec": "2.0.0",
"type": "version"
},
"/Users/jordan/Documents/virtual-proctoring-application/student-application"
]
],
"_from": "@smarterservices/smarterclock@2.0.0",
"_id": "@smarterservices/smarterclock@2.0.0",
"_inCache": true,
"_location": "/@smarterservices/smarterclock",
"_nodeVersion": "6.0.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/smarterclock-2.0.0.tgz_1509642560228_0.828052198747173"
},
"_npmUser": {
"name": "jpiepkow",
"email": "jpiepkow@gmail.com"
},
"_npmVersion": "4.5.0",
"_phantomChildren": {},
"_requested": {
"raw": "@smarterservices/smarterclock@2.0.0",
"scope": "@smarterservices",
"escapedName": "@smarterservices%2fsmarterclock",
"name": "@smarterservices/smarterclock",
"rawSpec": "2.0.0",
"spec": "2.0.0",
"type": "version"
},
"_requiredBy": [
"/",
"/sp-common"
],
"_resolved": "https://registry.npmjs.org/@smarterservices/smarterclock/-/smarterclock-2.0.0.tgz",
"_shasum": "3769de949faaa5f97b5ed0713569ab019f9310e0",
"_shrinkwrap": null,
"_spec": "@smarterservices/smarterclock@2.0.0",
"_where": "/Users/jordan/Documents/virtual-proctoring-application/student-application",
"author": {
"name": "jordan l piepkow"
},
"bugs": {
"url": "https://github.com/SmarterServices/smarterclock/issues"
},
"dependencies": {
"ntp-client": "^0.5.3"
},
"description": "store of delta values between ntp time and local time to get an accurate sync time",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "3769de949faaa5f97b5ed0713569ab019f9310e0",
"tarball": "https://registry.npmjs.org/@smarterservices/smarterclock/-/smarterclock-2.0.0.tgz"
},
"gitHead": "c308d4b4efc9656dd69aefa93732b3244581d610",
"homepage": "https://github.com/SmarterServices/smarterclock#readme",
"keywords": [

@@ -14,10 +72,29 @@ "ntp",

],
"author": "jordan l piepkow",
"dependencies": {
"ntp-client": "^0.5.3"
},
"main": "index.js",
"maintainers": [
{
"name": "jasonfill",
"email": "jasonfill@gmail.com"
},
{
"name": "jpiepkow",
"email": "jpiepkow@gmail.com"
},
{
"name": "smarterservicesdev",
"email": "jason@smarterservices.com"
}
],
"name": "@smarterservices/smarterclock",
"optionalDependencies": {},
"readme": "# SmarterClock\n\nUsed to ensure the time used is in sync across distributed systems. The sync is achived by the following process:\n\n* Fetches the time from an NTP server.\n* Adjusts for network latency and transfer time\n* Computes the delta between the NTP server and the system clock and stores the delta for later use.\n* Uses all the stored deltas to get the average time drift from UTC.\n\n##Getting Started\nInstall the module.\n\n```javascript\nnpm install @smarterservices/smarterclock\n```\t\n\nImport the module into your codebase\n\n```javascript\nvar smarterclock = require('@smarterservices/smarterclock')\n```\t\n\nCreate an instance of the clock object passing in the required params. See the options section below for options that can be used.\n\n```javascript\nvar options = {};\n\n// create a new instance\nvar clock = new smarterclock(options);\n\n// get the current unix timestamp\nvar currentTime = clock.getTime();\n\nconsole.log(currentTime);\n```\n\n## Options\n\nThe clock constructor can accept the following options. **all options are optional**\n\n* ```syncDelay``` (number) : The time (in seconds) between each call to an NTP server to get the latest UTC timestamp. Defaults to 300 (which is 5 minutes).\n* ```history``` (number): The nubmer of delta values that should be maintained and used for calculating your local time drift. Defaults to 10.\n* ```servers``` (array) : An array of NTP servers to use when looking up time. Each value in the array should be an object with the keys ```server``` and ```port```. Defaults to pool.ntp.org.\n\n### Example\n\n```javascript\n{\n\t\"syncDelay\" : 60,\n\t\"history\": 10,\n\t\"servers\" : [{\"server\": \"pool.ntp.org\", \"port\": 123}]\n}\n```\t\n\n\t\n## Methods\n\n###getTime()\n\nReturns unix timestamp based on delta values between server and your local time. This is the time that can be used instead of ```new Date().getTime()```\n\t\n#### Example\t\n\n```javascript\nclock.getTime();\n```\t\n\t\n\t\n\n###syncTime()\n\nAn on-demand method that will force a sync with an NTP server.\n\n```javascript\nclock.syncTime();\n```\t\n\t\t\t",
"readmeFilename": "readme.md",
"repository": {
"type": "git",
"url": "https://github.com/SmarterServices/smarterclock.git"
}
"url": "git+https://github.com/SmarterServices/smarterclock.git"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "2.0.1"
}
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