Skip to content

Commit

Permalink
Merge pull request #451 from kongfei605/collect_interval
Browse files Browse the repository at this point in the history
fix: time interval caculation
  • Loading branch information
kongfei605 authored Apr 10, 2023
2 parents 80eccee + c524e7a commit 7b31c5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions agent/metrics_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ func (r *InputReader) startInput() {
}
timer := time.NewTimer(0 * time.Second)
defer timer.Stop()
var start time.Time

for {
select {
case <-r.quitChan:
close(r.quitChan)
return
case <-timer.C:
var start time.Time
start = time.Now()
if config.Config.DebugMode {
start = time.Now()
log.Println("D!", r.inputName, ": before gather once")
}

Expand Down

0 comments on commit 7b31c5f

Please sign in to comment.