1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-06-02 01:09:08 -04:00

dice.RandomUint16

This commit is contained in:
Darien Raymond
2017-02-14 22:29:44 +01:00
parent 3c032f0d53
commit 48eb40ff39
7 changed files with 13 additions and 8 deletions

View File

@@ -15,6 +15,11 @@ func Roll(n int) int {
return rand.Intn(n)
}
// RandomUint16 returns a random uint16 value.
func RandomUint16() uint16 {
return uint16(rand.Intn(65536))
}
func init() {
rand.Seed(time.Now().Unix())
}