node-opcua-date-time
Advanced tools
Comparing version 2.104.0 to 2.105.0
@@ -136,4 +136,4 @@ "use strict"; | ||
adjustmentCount: 0, | ||
interval: 3000, | ||
timerInstallationCount: 0, | ||
interval: 3000 /* every 30 seconds */, | ||
timerInstallationCount: 0 | ||
}; | ||
@@ -144,4 +144,4 @@ // update refTime now and then to make sure that we don't miss | ||
let timerId; | ||
const g_setInterval = (typeof global === "object") ? global.setInterval : setInterval; | ||
const g_clearInterval = (typeof global === "object") ? global.clearInterval : clearInterval; | ||
const g_setInterval = typeof global === "object" ? global.setInterval : setInterval; | ||
const g_clearInterval = typeof global === "object" ? global.clearInterval : clearInterval; | ||
function installPeriodicClockAdjustment() { | ||
@@ -186,4 +186,2 @@ exports.periodicClockAdjustment.timerInstallationCount++; | ||
const picoseconds = (gClock.tick[1] % 1000000) * 1000; | ||
// display drift in seconds : | ||
// console.log(gClock.tick[0] - Math.floor((Date.now()-refTime) / 1000)); | ||
gClock.timestamp = new Date(milliseconds); | ||
@@ -190,0 +188,0 @@ gClock.picoseconds = picoseconds; |
@@ -5,3 +5,3 @@ { | ||
"types": "./dist/index.d.ts", | ||
"version": "2.104.0", | ||
"version": "2.105.0", | ||
"description": "pure nodejs OPCUA SDK - module date-time", | ||
@@ -15,10 +15,10 @@ "scripts": { | ||
"long": "^4.0.0", | ||
"node-opcua-assert": "2.104.0", | ||
"node-opcua-binary-stream": "2.104.0", | ||
"node-opcua-utils": "2.104.0" | ||
"node-opcua-assert": "2.105.0", | ||
"node-opcua-binary-stream": "2.105.0", | ||
"node-opcua-utils": "2.105.0" | ||
}, | ||
"devDependencies": { | ||
"bignumber.js": "^9.1.1", | ||
"node-opcua-benchmarker": "2.104.0", | ||
"node-opcua-debug": "2.104.0", | ||
"node-opcua-benchmarker": "2.105.0", | ||
"node-opcua-debug": "2.105.0", | ||
"should": "^13.2.3", | ||
@@ -42,3 +42,3 @@ "sinon": "^15.1.0" | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "3cd6d355e8b3c66822d08a3ca682659ea5d1a55d", | ||
"gitHead": "41c30f321debfe92128905d97a52426b9d7f9b9e", | ||
"files": [ | ||
@@ -45,0 +45,0 @@ "dist", |
@@ -162,4 +162,4 @@ /** | ||
adjustmentCount: 0, | ||
interval: 3000, /* every 30 seconds */ | ||
timerInstallationCount: 0, | ||
interval: 3000 /* every 30 seconds */, | ||
timerInstallationCount: 0 | ||
}; | ||
@@ -170,4 +170,4 @@ // update refTime now and then to make sure that we don't miss | ||
let timerId: NodeJS.Timeout | null; | ||
const g_setInterval = (typeof global === "object") ? global.setInterval : setInterval; | ||
const g_clearInterval = (typeof global === "object") ? global.clearInterval: clearInterval; | ||
const g_setInterval = typeof global === "object" ? global.setInterval : setInterval; | ||
const g_clearInterval = typeof global === "object" ? global.clearInterval : clearInterval; | ||
export function installPeriodicClockAdjustment() { | ||
@@ -214,4 +214,2 @@ periodicClockAdjustment.timerInstallationCount++; | ||
const picoseconds = (gClock.tick[1] % 1000000) * 1000; | ||
// display drift in seconds : | ||
// console.log(gClock.tick[0] - Math.floor((Date.now()-refTime) / 1000)); | ||
@@ -230,3 +228,3 @@ gClock.timestamp = new Date(milliseconds) as DateWithPicoseconds; | ||
} | ||
export const minDate = new Date(Date.UTC(1601, 0, 1, 0, 0, 0)); | ||
@@ -233,0 +231,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36794
639
+ Addednode-opcua-assert@2.105.0(transitive)
+ Addednode-opcua-binary-stream@2.105.0(transitive)
+ Addednode-opcua-buffer-utils@2.105.0(transitive)
+ Addednode-opcua-utils@2.105.0(transitive)
- Removednode-opcua-assert@2.104.0(transitive)
- Removednode-opcua-binary-stream@2.104.0(transitive)
- Removednode-opcua-buffer-utils@2.104.0(transitive)
- Removednode-opcua-utils@2.104.0(transitive)
Updatednode-opcua-assert@2.105.0
Updatednode-opcua-utils@2.105.0