GE Lua Documentation

Press F to search!

timeprobe

Definition


-- @/lua/common/utils.lua:1334

-- prints duration in ms
function timeprobe(omitPrint)
  if not __prevtime__ then
    rawset(_G, '__prevtime__', os.clockhp())
  else
    local t = os.clockhp() - __prevtime__
    if not omitPrint then
      print(t * 1000)
    end
    __prevtime__ = false
    return t
  end
end

Callers

@/lua/ge/map.lua

  --timeprobe()
  local trajectory = createTrajectory(path, s, useRawPos)
  end
  --timeprobe()
@/lua/vehicle/ai.lua

      --timeprobe()