initial commits

master
Charles Iliya Krempeaux 2021-11-07 00:58:42 -07:00
parent 94e13d7ad0
commit 28e3af3f2d
1 changed files with 20 additions and 0 deletions

20
generate.go 100644
View File

@ -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
}