Module:Infobox interval: Difference between revisions

Plumtree (talk | contribs)
mNo edit summary
Plumtree (talk | contribs)
mNo edit summary
Line 11: Line 11:
end
end


local used_ids = {}
local function gen_id()
local function gen_id()
math.randomseed(math.floor((os.clock() % 1) * 1000000) % 1000000)
local id = math.random(0, 100000)
local id = math.random(0, 100000)
while used_ids[id] do
id = math.random(0, 100000)
end
used_ids[id] = true
return id
return id
end
end