mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-01-23 02:34:42 +00:00
Remove not needed rand seeding
This commit is contained in:
parent
b0b7966b47
commit
e3ecd8fef0
6 changed files with 0 additions and 17 deletions
|
|
@ -1,9 +1,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
config "github.com/giongto35/cloud-game/v3/pkg/config/coordinator"
|
||||
"github.com/giongto35/cloud-game/v3/pkg/coordinator"
|
||||
"github.com/giongto35/cloud-game/v3/pkg/logger"
|
||||
|
|
@ -13,7 +10,6 @@ import (
|
|||
var Version = "?"
|
||||
|
||||
func main() {
|
||||
rand.New(rand.NewSource(time.Now().UnixNano())) // !to remove when bumped to 1.20
|
||||
conf := config.NewConfig()
|
||||
conf.ParseFlags()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
config "github.com/giongto35/cloud-game/v3/pkg/config/worker"
|
||||
|
|
@ -14,7 +13,6 @@ import (
|
|||
var Version = "?"
|
||||
|
||||
func run() {
|
||||
rand.New(rand.NewSource(time.Now().UnixNano())) // !to remove when bumped to 1.20
|
||||
conf := config.NewConfig()
|
||||
conf.ParseFlags()
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,8 @@ package zip
|
|||
import (
|
||||
cr "crypto/rand"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"reflect"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestCompression(t *testing.T) {
|
||||
|
|
@ -63,7 +61,6 @@ func BenchmarkCompressions(b *testing.B) {
|
|||
{name: "compress", size: 1024 * 1024 * 2},
|
||||
}
|
||||
for _, bm := range benchmarks {
|
||||
rand.New(rand.NewSource(time.Now().UnixNano())) // !to remove when bumped to 1.20
|
||||
b.Run(fmt.Sprintf("%v %v", bm.name, bm.size), func(b *testing.B) {
|
||||
b.StopTimer()
|
||||
dat := make([]byte, bm.size)
|
||||
|
|
|
|||
|
|
@ -167,7 +167,6 @@ func TestStateConcurrency(t *testing.T) {
|
|||
})
|
||||
mock.handleAudio(func(_ *emulator.GameAudio) {})
|
||||
|
||||
rand.New(rand.NewSource(int64(test.seed))) // !to remove when bumped to 1.20
|
||||
t.Logf("Random seed is [%v]\n", test.seed)
|
||||
t.Logf("Save path is [%v]\n", mock.paths.save)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import (
|
|||
"math/rand"
|
||||
"reflect"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/giongto35/cloud-game/v3/pkg/logger"
|
||||
"github.com/giongto35/cloud-game/v3/pkg/worker/encoder"
|
||||
|
|
@ -138,8 +137,6 @@ func BenchmarkResampler(b *testing.B) {
|
|||
}
|
||||
|
||||
func gen(l int) []int16 {
|
||||
rand.New(rand.NewSource(time.Now().UnixNano())) // !to remove when bumped to 1.20
|
||||
|
||||
nums := make([]int16, l)
|
||||
for i := range nums {
|
||||
nums[i] = int16(rand.Intn(10))
|
||||
|
|
|
|||
|
|
@ -65,10 +65,6 @@ type (
|
|||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
rand.New(rand.NewSource(time.Now().UnixNano())) // !to remove when bumped to 1.20
|
||||
}
|
||||
|
||||
// NewRecording creates new media recorder for the emulator.
|
||||
func NewRecording(meta Meta, log *logger.Logger, opts Options) *Recording {
|
||||
savePath, err := filepath.Abs(opts.Dir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue