mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
binance: rename to timeSetterOnce
This commit is contained in:
parent
cf5e81c848
commit
ff61235e70
|
@ -82,7 +82,7 @@ type Exchange struct {
|
|||
client2 *binanceapi.RestClient
|
||||
}
|
||||
|
||||
var timeSetter sync.Once
|
||||
var timeSetterOnce sync.Once
|
||||
|
||||
func New(key, secret string) *Exchange {
|
||||
var client = binance.NewClient(key, secret)
|
||||
|
@ -125,7 +125,7 @@ func New(key, secret string) *Exchange {
|
|||
}
|
||||
|
||||
ctx := context.Background()
|
||||
go timeSetter.Do(func() {
|
||||
go timeSetterOnce.Do(func() {
|
||||
setServerTime(ctx)
|
||||
|
||||
ticker := time.NewTicker(time.Hour)
|
||||
|
|
Loading…
Reference in New Issue
Block a user