initial commits
parent
94e13d7ad0
commit
28e3af3f2d
|
@ -0,0 +1,20 @@
|
|||
package iid
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
randomness = rand.New(rand.NewSource( time.Now().UTC().UnixNano() ))
|
||||
)
|
||||
|
||||
func generate() uint64 {
|
||||
|
||||
var now int64 = time.Now().Unix()
|
||||
var chaos uint64 = randomness.Uint64()
|
||||
|
||||
var value uint64 = compile(uint64(now), chaos)
|
||||
|
||||
return value
|
||||
}
|
Loading…
Reference in New Issue