GE Lua Documentation

Press F to search!

timerStart

Definition


-- @/lua/ge/extensions/gameplay/statistic.lua:260

local function timerStart(name, increment, aggregate, useSimTime)
  if name==nil then log("E", "timerStart", "invalid timer name") return end
  if useSimTime==nil then useSimTime=false end
  if increment==nil then increment=true end
  if aggregate==nil then aggregate=false end
  if timers[name] then
    log("W","timerStart", "Timer "..dumps(name).." already started. will be ignored")
    return
  end
  timers[name] = {sim=useSimTime,increment=increment,start= (useSimTime and simtimer or realtimer),aggregate=aggregate}
end

Callers

@/lua/ge/extensions/gameplay/statistic.lua
  currentActivity = activityType .."/".. levelFolder .. activityDetail ..".time"
  timerStart(currentActivity)
    currentMod = activityType
    timerStart("general/mode/"..currentMod..".time")
  end
    currentLevel = levelFolder
    timerStart("general/map/"..currentLevel..".time")
  end
local function onEditorActivated()
  timerStart("general/editor.time")
end