mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-08 17:24:06 +00:00
a little elegance
This commit is contained in:
parent
6870d83001
commit
bf8fc03480
@ -16,10 +16,7 @@ end
|
|||||||
-----
|
-----
|
||||||
-- initializes the pseudo random generator
|
-- initializes the pseudo random generator
|
||||||
-- if environemnt "SEED" is set, use that as seed.
|
-- if environemnt "SEED" is set, use that as seed.
|
||||||
local seed = os.getenv("SEED")
|
local seed = os.getenv("SEED") or os.time()
|
||||||
if not seed then
|
|
||||||
seed = os.time()
|
|
||||||
end
|
|
||||||
math.randomseed(seed)
|
math.randomseed(seed)
|
||||||
cwriteln("random seed: ", seed)
|
cwriteln("random seed: ", seed)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user