bugfix: performance.now function should return MS instead of nano

This commit is contained in:
Laurens Lavaert
2022-07-08 12:00:07 +02:00
committed by Jarred Sumner
parent 118c134918
commit 36718c45fc

View File

@@ -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));
}