diff options
| author | 2022-07-08 12:00:07 +0200 | |
|---|---|---|
| committer | 2022-07-09 18:33:51 -0700 | |
| commit | 36718c45fc8eb00d2244915fac80154ce641f5dd (patch) | |
| tree | 15e1f18d7d13f120967b41a53b1ca888b4df54fe /src | |
| parent | 118c1349183f66736572d03ff6847b0fd465b5ad (diff) | |
| download | bun-36718c45fc8eb00d2244915fac80154ce641f5dd.tar.gz bun-36718c45fc8eb00d2244915fac80154ce641f5dd.tar.zst bun-36718c45fc8eb00d2244915fac80154ce641f5dd.zip | |
bugfix: performance.now function should return MS instead of nano
Diffstat (limited to 'src')
| -rw-r--r-- | src/bun.js/bindings/ZigGlobalObject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp index 138267cd6..25a47c137 100644 --- a/src/bun.js/bindings/ZigGlobalObject.cpp +++ b/src/bun.js/bindings/ZigGlobalObject.cpp @@ -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)); } |
