use better seed

This commit is contained in:
Luna 2020-06-02 16:59:36 -03:00
parent aeb76fe6c0
commit dc98c7a22f

View file

@ -79,7 +79,7 @@ pub fn temporaryName(allocator: *std.mem.Allocator) ![]u8 {
var nam = try allocator.alloc(u8, template.len);
std.mem.copy(u8, nam, template);
const seed = @bitCast(u64, std.time.timestamp());
const seed = @truncate(u64, @bitCast(u128, std.time.nanoTimestamp()));
var r = std.rand.DefaultPrng.init(seed);
var fill = nam[template_start.len..nam.len];