Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-opcua-date-time

Package Overview
Dependencies
Maintainers
1
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-date-time - npm Package Compare versions

Comparing version 2.5.1 to 2.5.5

6

dist/date_time.js

@@ -170,4 +170,10 @@ "use strict";

const hrtime = process.hrtime;
const setTimeout_chek = setTimeout;
/*kWithProcessHRTime*/
function getCurrentClock() {
if (setTimeout_chek !== setTimeout) {
// is fake sinon clock being used ?
// in this case hrtime is not working
return getCurrentClockWithJavascriptDate();
}
gClock.tick = hrtime(origin); // [seconds, nanoseconds]

@@ -174,0 +180,0 @@ const milliseconds = gClock.tick[0] * 1000 + Math.floor(gClock.tick[1] / 1000000) + refTime;

4

package.json

@@ -5,3 +5,3 @@ {

"types": "./dist/index.d.ts",
"version": "2.5.1",
"version": "2.5.5",
"description": "pure nodejs OPCUA SDK - module -date-time",

@@ -39,3 +39,3 @@ "scripts": {

"homepage": "http://node-opcua.github.io/",
"gitHead": "4cc18f384bbdf33c5cdd2a7857e810425aa67c8b"
"gitHead": "4bd588e86bb9c3772dda984526a9b4aa1f110d3f"
}

@@ -189,3 +189,2 @@ /**

// make sure we get a pointer to the actual process.hrtime,

@@ -195,4 +194,11 @@ // just in case it get overridden by some library (such as sinon)

const setTimeout_chek = setTimeout;
/*kWithProcessHRTime*/
export function getCurrentClock(): PreciseClock {
if (setTimeout_chek !== setTimeout) {
// is fake sinon clock being used ?
// in this case hrtime is not working
return getCurrentClockWithJavascriptDate();
}
gClock.tick = hrtime(origin); // [seconds, nanoseconds]

@@ -199,0 +205,0 @@ const milliseconds = gClock.tick[0] * 1000 + Math.floor(gClock.tick[1] / 1000000) + refTime;

Sorry, the diff of this file is not supported yet

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