File: utils.lua

package info (click to toggle)
vim-vimtex 2.16-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,660 kB
  • sloc: makefile: 367; python: 103
file content (22 lines) | stat: -rw-r--r-- 381 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- VimTeX - LaTeX plugin for Vim
--
-- Maintainer: Karl Yngve LervÄg
-- Email:      karl.yngve@gmail.com
--

local M = {}

---@param title string?
function M.time(title)
  local t1 = vim.uv.hrtime()/1000000000
  if M.t0 then
    if title then
      print("dt " .. title .. " = " .. (t1 - M.t0))
    else
      print("dt = " .. (t1 - M.t0))
    end
  end
  M.t0 = t1
end

return M