Skip to content

Commit 5082cd5

Browse files
authored
fix(stats): corrected typo in cputime() for Linux (#916)
1 parent 29f8e3e commit 5082cd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/lazy/stats.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function M.cputime()
5050
local pnano = assert(ffi.new("nanotime[?]", 1))
5151
local CLOCK_PROCESS_CPUTIME_ID = jit.os == "OSX" and 12 or 2
5252
ffi.C.clock_gettime(CLOCK_PROCESS_CPUTIME_ID, pnano)
53-
return tonumber(pnano[0].tv_sec) / 1e6 + tonumber(pnano[0].tv_nsec) / 1e6
53+
return tonumber(pnano[0].tv_sec) * 1e3 + tonumber(pnano[0].tv_nsec) / 1e6
5454
end
5555

5656
local function fallback()

0 commit comments

Comments
 (0)