fix: rebase error

This commit is contained in:
zenix 2022-07-26 20:14:23 +09:00
parent 85f8b9510d
commit da51bf44c8

View File

@ -125,30 +125,7 @@ func New(key, secret string) *Exchange {
ex.setServerTimeOffset(ctx) ex.setServerTimeOffset(ctx)
} }
} }
if err = client2.SetTimeOffsetFromServer(context.Background()); err != nil {
log.WithError(err).Error("can not set server time")
}
}) })
go func() {
ticker := time.NewTicker(time.Hour)
defer ticker.Stop()
for _ = range ticker.C {
_, err = client.NewSetServerTimeService().Do(context.Background())
if err != nil {
log.WithError(err).Error("can not set server time")
}
_, err = futuresClient.NewSetServerTimeService().Do(context.Background())
if err != nil {
log.WithError(err).Error("can not set server time")
}
if err = client2.SetTimeOffsetFromServer(context.Background()); err != nil {
log.WithError(err).Error("can not set server time")
}
}
}()
} }
return ex return ex