diff --git a/input_file.go b/input_file.go index a039d9c..5447492 100644 --- a/input_file.go +++ b/input_file.go @@ -238,13 +238,15 @@ func (i *FileInput) emit() { if lastTime != -1 { diff := reader.timestamp - lastTime - lastTime = reader.timestamp if i.speedFactor != 1 { diff = int64(float64(diff) / i.speedFactor) } - time.Sleep(time.Duration(diff)) + if diff >= 0 { + lastTime = reader.timestamp + time.Sleep(time.Duration(diff)) + } } else { lastTime = reader.timestamp }