Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

refactor: replace process.hrtime with Date.now #176

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

alan-agius4
Copy link
Contributor

Switched from process.hrtime to Date.now as high-resolution timing is not required in this case. This change removes the dependency on Node.js-specific functionality, enabling the library to run in environments like Cloudflare Workers using unenv with Angular.

//cc @kara

@alan-agius4 alan-agius4 force-pushed the time branch 2 times, most recently from ba70226 to f02b09d Compare October 10, 2024 11:54
Switched from `process.hrtime` to `Date.now` as high-resolution timing is not required in this case. This change removes the dependency on Node.js-specific functionality, enabling the library to run in environments like Cloudflare Workers using `unenv` with Angular.
Copy link
Collaborator

@kara kara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kara kara merged commit 7e062c1 into GoogleChromeLabs:main Oct 10, 2024
2 checks passed
@alan-agius4 alan-agius4 deleted the time branch October 10, 2024 20:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants