mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
bugfix: performance.now function should return MS instead of nano
This commit is contained in:
committed by
Jarred Sumner
parent
118c134918
commit
36718c45fc
@@ -1496,7 +1496,7 @@ JSC_DEFINE_HOST_FUNCTION(functionPerformanceNow, (JSGlobalObject * globalObject,
|
||||
auto* global = reinterpret_cast<GlobalObject*>(globalObject);
|
||||
// nanoseconds to seconds
|
||||
uint64_t time = Bun__readOriginTimer(global->bunVM());
|
||||
double result = time / 1000000000.0;
|
||||
double result = time / 1000000000000000.0;
|
||||
return JSValue::encode(jsNumber(time));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user