authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-08-11 00:00:33 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-08-11 00:00:33 -07:00
log566f2b755c477215a656d2df1eae611a411f98c3
tree227606a1ccd4b7bac1c1141fdd7e4912cd7252a5
parentb3967c9db9fcd4febc0b7ef6558474d8c4ab8828

add a comment about this magic number


1 files changed, 1 insertions(+), 1 deletions(-)

ulid.zig+1-1
......@@ -19,7 +19,7 @@ pub const Factory = struct {
1919 pub fn newULID(self: Factory) ULID {
2020 const now = std.time.milliTimestamp();
2121 return ULID{
22 .timestamp = std.math.cast(u48, now - self.epoch) orelse @panic("time.milliTimestamp() is higher than 281474976710655"),
22 .timestamp = std.math.cast(u48, now - self.epoch) orelse @panic("time.milliTimestamp() is higher than 281474976710655"), // this is Tue Aug 02 10889 05:31:50.655 UTC
2323 .randomnes = self.rand.int(u80),
2424 };
2525 }