Skip to content

Commit

Permalink
减少 sleep 时间
Browse files Browse the repository at this point in the history
  • Loading branch information
EndlessCheng committed Apr 3, 2022
1 parent 132aae8 commit b3a0a11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions copypasta/template/leetcode/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func fetchProblemURLs(session *grequests.Session, contestTag string) (problems [
return
}

sleepTime += 2 * time.Second // 消除误差
sleepTime += 500 * time.Millisecond // 消除误差
fmt.Printf("%s尚未开始,等待中……\n%v\n", d.Contest.Title, sleepTime)
time.Sleep(sleepTime)
return fetchProblemURLs(session, contestTag)
Expand Down Expand Up @@ -630,7 +630,7 @@ func GenLeetCodeTests(username, password, contestTag string, openWebPage bool, c
break
}
fmt.Println(err)
time.Sleep(time.Second)
time.Sleep(500 * time.Millisecond)
}

if len(problems) == 0 {
Expand Down

0 comments on commit b3a0a11

Please sign in to comment.