fix: replace vim.* "requires" with explicit calls to vim functions (#1701)
This commit is contained in:
committed by
GitHub
parent
6d6a44626d
commit
8cc369695b
@@ -1,5 +1,3 @@
|
||||
local uv = vim.loop
|
||||
|
||||
local M = {
|
||||
config = nil,
|
||||
path = nil,
|
||||
@@ -29,7 +27,7 @@ function M.profile_start(fmt, ...)
|
||||
return
|
||||
end
|
||||
M.line("profile", "START " .. (fmt or "???"), ...)
|
||||
return uv.hrtime()
|
||||
return vim.loop.hrtime()
|
||||
end
|
||||
|
||||
--- Write to log file via M.line
|
||||
@@ -39,7 +37,7 @@ function M.profile_end(start, fmt, ...)
|
||||
if not M.path or not M.config.types.profile and not M.config.types.all then
|
||||
return
|
||||
end
|
||||
local millis = start and math.modf((uv.hrtime() - start) / 1000000) or -1
|
||||
local millis = start and math.modf((vim.loop.hrtime() - start) / 1000000) or -1
|
||||
M.line("profile", "END " .. (fmt or "???") .. " " .. millis .. "ms", ...)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user