From 359280a35319fbf212ff901e1507b2e952aa4142 Mon Sep 17 00:00:00 2001 From: 1F616EMO Date: Fri, 25 Oct 2024 18:38:27 +0800 Subject: [PATCH] Localize areas.startTime startTime is not used anywhere else, so localizing it makes sense and saves memory. --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index a65ad3d..c4e57b4 100644 --- a/init.lua +++ b/init.lua @@ -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") @@ -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