From c629cfd8a2cf4184d03cfc9ccd3cceac74cd2f3b Mon Sep 17 00:00:00 2001 From: qydysky Date: Thu, 6 Aug 2020 15:50:57 +0800 Subject: [PATCH] 38 --- Reqf.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Reqf.go b/Reqf.go index b0d71dd..3417ef3 100644 --- a/Reqf.go +++ b/Reqf.go @@ -22,6 +22,7 @@ type Rval struct { AcceptLanguage string Connection string Retry int + SleepTime int JustResponseCode bool SaveToPath string } @@ -60,6 +61,7 @@ func (this *req) Reqf(val Rval) (error) { for ;_val.Retry>=0;_val.Retry-- { returnErr=this.Reqf_1(_val) if returnErr==nil {break} + time.Sleep(time.Duration(_val.SleepTime)*time.Millisecond) } return returnErr -- 2.39.2