mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-11-06 02:07:17 +00:00
Remove dice package
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
package protocol
|
||||
|
||||
import (
|
||||
"math/rand/v2"
|
||||
"time"
|
||||
|
||||
"github.com/xtls/xray-core/common/dice"
|
||||
)
|
||||
|
||||
type Timestamp int64
|
||||
@@ -16,7 +15,7 @@ func NowTime() Timestamp {
|
||||
|
||||
func NewTimestampGenerator(base Timestamp, delta int) TimestampGenerator {
|
||||
return func() Timestamp {
|
||||
rangeInDelta := dice.Roll(delta*2) - delta
|
||||
rangeInDelta := rand.N(delta*2) - delta
|
||||
return base + Timestamp(rangeInDelta)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user