mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
remove deprecated rand.Seed calls
This commit is contained in:
committed by
Dan Christian Bogos
parent
3187bca82e
commit
ede004bc44
@@ -20,7 +20,6 @@ package engine
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"runtime"
|
||||
"sort"
|
||||
"sync"
|
||||
@@ -32,10 +31,6 @@ import (
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
func init() {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
}
|
||||
|
||||
// ResourceProfile represents the user configuration for the resource
|
||||
type ResourceProfile struct {
|
||||
Tenant string
|
||||
|
||||
@@ -236,7 +236,6 @@ func (sS *SessionS) setSTerminator(ctx *context.Context, s *Session, opts engine
|
||||
return
|
||||
}
|
||||
if maxDelay != 0 {
|
||||
rand.Seed(time.Now().Unix())
|
||||
ttl += time.Duration(
|
||||
rand.Int63n(maxDelay.Milliseconds()) * time.Millisecond.Nanoseconds())
|
||||
}
|
||||
|
||||
@@ -66,7 +66,6 @@ var (
|
||||
|
||||
func init() {
|
||||
startCGRateSTime = time.Now()
|
||||
math_rand.Seed(startCGRateSTime.UnixNano())
|
||||
boolGenerator = newBoolGen()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user