Skip to content

Commit

Permalink
fix(stats): corrected typo in cputime() for Linux (#916)
Browse files Browse the repository at this point in the history
  • Loading branch information
palacaze committed Jul 6, 2023
1 parent 29f8e3e commit 5082cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/lazy/stats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function M.cputime()
local pnano = assert(ffi.new("nanotime[?]", 1))
local CLOCK_PROCESS_CPUTIME_ID = jit.os == "OSX" and 12 or 2
ffi.C.clock_gettime(CLOCK_PROCESS_CPUTIME_ID, pnano)
return tonumber(pnano[0].tv_sec) / 1e6 + tonumber(pnano[0].tv_nsec) / 1e6
return tonumber(pnano[0].tv_sec) * 1e3 + tonumber(pnano[0].tv_nsec) / 1e6
end

local function fallback()
Expand Down

0 comments on commit 5082cd5

Please sign in to comment.