Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
generate lua safe random numbers
for i = 1, 10000 do
local t = os.time()
local c = os.clock()
local seed = t + (c*1000000)
print(t, c, seed, math.random(1, 2147483647))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment