Skip to content

Conversation

@flakey5
Copy link
Member

@flakey5 flakey5 commented Oct 19, 2024

This adds a nowAbsolute function to the fast timers lib that allows for fetching the approximate absolute timestamp. This is useful in places like the cache interceptor and cache stores, where we're currently calling Date.now().

image

cc @mcollina

Copy link
Member

@ronag ronag left a comment

Choose a reason for hiding this comment

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

This can't use the no stall timer.

@ronag
Copy link
Member

ronag commented Oct 19, 2024

Add another variable called fastNowAbsolute which is updated to date.now in every refresh

@@ -0,0 +1,13 @@
import { bench, group, run } from 'mitata'
Copy link
Contributor

Choose a reason for hiding this comment

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

kind of trivial benchmark.

@flakey5 flakey5 force-pushed the flakey5/20241018/now-absolute branch from 152c924 to eb65121 Compare November 2, 2024 08:24
@mcollina
Copy link
Member

mcollina commented Nov 3, 2024

CI is very red

@mcollina
Copy link
Member

Still very red

@flakey5 flakey5 force-pushed the flakey5/20241018/now-absolute branch from b9d2d1a to a8238fd Compare November 14, 2024 05:03
@mcollina
Copy link
Member

This now conflicts

@flakey5 flakey5 force-pushed the flakey5/20241018/now-absolute branch from a8238fd to b494bf1 Compare November 18, 2024 17:31
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit 24df4a5 into nodejs:main Nov 18, 2024
33 of 36 checks passed
@github-actions github-actions bot mentioned this pull request Dec 3, 2024
This was referenced Dec 16, 2024
@github-actions github-actions bot mentioned this pull request Mar 12, 2025
@github-actions github-actions bot mentioned this pull request May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants