Skip to content

Commit 18c632c

Browse files
committedApr 15, 2024
Fix performance.now() to return a double
1 parent 7597fc7 commit 18c632c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎quickjs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ struct JSContext {
400400
JSValue global_obj; /* global object */
401401
JSValue global_var_obj; /* contains the global let/const definitions */
402402

403-
uint64_t time_origin;
403+
double time_origin;
404404

405405
uint64_t random_state;
406406
bf_context_t *bf_ctx; /* points to rt->bf_ctx, shared by all contexts */
@@ -51886,7 +51886,7 @@ void JS_AddIntrinsicTypedArrays(JSContext *ctx)
5188651886

5188751887
/* Performance */
5188851888

51889-
static uint64_t js__now_ms(void)
51889+
static double js__now_ms(void)
5189051890
{
5189151891
return js__hrtime_ns() / 1e6;
5189251892
}

0 commit comments

Comments
 (0)