This commit is contained in:
shoopea 2019-06-03 09:21:31 +08:00
parent 5e75ca3334
commit 51ef0bfb21
2 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ func main() {
flag.Parse()
// randomize
RndSrc = rand.New(rand.NewSource(time.Now()))
RndSrc = rand.New(rand.NewSource(time.Now().UTC().UnixNano()))
err := gcfg.ReadFileInto(&cfg, *config)
failOnError(err, "Parsing config")

View File

@ -80,7 +80,7 @@ func toChatWarsDate(t time.Time) (s string, err error) {
func RndInt64() int64 {
RndMu.Lock()
i := RndSrc.Uint64()
i := RndSrc.Int63()
RndMu.Unlock()
return i
}