Skip to content

Commit

Permalink
Localize areas.startTime
Browse files Browse the repository at this point in the history
startTime is not used anywhere else, so localizing it makes sense and saves memory.
  • Loading branch information
Emojigit committed Oct 25, 2024
1 parent b87fbe8 commit 18fbe8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ areas = {}
areas.factions_available = minetest.get_modpath("playerfactions") and true

areas.adminPrivs = {areas=true}
areas.startTime = os.clock()
local startTime = os.clock()

areas.modpath = minetest.get_modpath("areas")
dofile(areas.modpath.."/settings.lua")
Expand Down Expand Up @@ -43,6 +43,6 @@ if not minetest.registered_privileges[areas.config.self_protection_privilege] th
end

if minetest.settings:get_bool("log_mods") then
local diffTime = os.clock() - areas.startTime
local diffTime = os.clock() - startTime
minetest.log("action", "areas loaded in "..diffTime.."s.")
end

0 comments on commit 18fbe8b

Please sign in to comment.