uuid: Add a time arg to ulid

This commit is contained in:
rhy 2023-01-09 14:02:00 -03:00
parent 04d658d601
commit b39e295eb4

View File

@ -74,8 +74,8 @@ end
--generate an ULID using this rng at this time
--see https://github.com/ulid/spec
--implementation based on https://github.com/Tieske/ulid.lua
function uuid.ulid(rng, time_func)
return _encode_time() .. _encode_random()
function uuid.ulid(rng, time)
return _encode_time(time) .. _encode_random(rng)
end
return uuid