github.com/go-eden/common@v0.1.15-0.20210617133546-059099253264/erand/rand_core.go (about)

     1  package erand
     2  
     3  import (
     4  	"math/rand"
     5  	"time"
     6  )
     7  
     8  var gr *rand.Rand
     9  
    10  func init() {
    11  	seed1 := time.Now().UnixNano()
    12  	seed2 := time.Now().UnixNano()
    13  	seed3 := time.Now().UnixNano()
    14  	src := rand.NewSource(seed1 | seed2 | seed3)
    15  	gr = rand.New(src)
    16  }