Skip to content

Commit bac2e51

Browse files
committed
Fix performance.now() to return a double
1 parent 8dcdb92 commit bac2e51

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 */
@@ -51884,7 +51884,7 @@ void JS_AddIntrinsicTypedArrays(JSContext *ctx)
5188451884

5188551885
/* Performance */
5188651886

51887-
static uint64_t js__now_ms(void)
51887+
static double js__now_ms(void)
5188851888
{
5188951889
return js__hrtime_ns() / 1e6;
5189051890
}

0 commit comments

Comments
 (0)