We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ebc9ec8 commit a5dd590Copy full SHA for a5dd590
1 file changed
cmd/logshare-cli/main.go
@@ -119,15 +119,11 @@ func run(conf *config) func(c *cli.Context) error {
119
hourStart := conf.startTime
120
hourEnd := hourStart + 3600
121
var previousRequest time.Time
122
- var requestGap time.Duration
123
for hourStart < conf.endTime {
124
if hourEnd > conf.endTime {
125
hourEnd = conf.endTime
126
}
127
- requestGap = time.Since(previousRequest)
128
- if requestGap.Seconds() < 5 {
129
- time.Sleep(requestGap)
130
- }
+ time.Sleep(5 * time.Second - time.Since(previousRequest))
131
previousRequest = time.Now()
132
meta, err = client.GetFromTimestamp(
133
conf.zoneID, hourStart, hourEnd, conf.count)
0 commit comments