Przeglądaj źródła

random: seed with Nanoseconds.

Dmitry Chestnykh 14 lat temu
rodzic
commit
f14d4a9979
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      random.go

+ 1 - 1
random.go

@@ -14,7 +14,7 @@ const idLen = 20
 var idChars = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
 
 func init() {
-	rand.Seed(time.Seconds())
+	rand.Seed(time.Nanoseconds())
 }
 
 // RandomDigits returns a byte slice of the given length containing