Generating unique ids in Mnesia

Joel Reymont <>
Thu Aug 18 17:35:11 CEST 2005


Is it fixed someplace that the components of now() are exactly 24, 20  
and 20 bits long?

On Aug 18, 2005, at 5:29 PM, Mark Scandariato wrote:

> If you don't mind gaps in the sequence numbers, then try:
>
> seq() ->
>     {M,S,U} = erlang:now(),
>     <<N:64>> = <<M:24, S:20, U:20>>,
>     N.



More information about the erlang-questions mailing list