-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
lib: add nowAbsolute
to fast timers
#3749
Conversation
There was a problem hiding this 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.
Add another variable called fastNowAbsolute which is updated to date.now in every refresh |
@@ -0,0 +1,13 @@ | |||
import { bench, group, run } from 'mitata' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kind of trivial benchmark.
152c924
to
eb65121
Compare
CI is very red |
Still very red |
b9d2d1a
to
a8238fd
Compare
This now conflicts |
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
a8238fd
to
b494bf1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
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 callingDate.now()
.cc @mcollina