cpu plugin: update LastStats before returning

fixes #388
This commit is contained in:
Cameron Sparr 2015-12-03 16:23:49 -07:00
parent 4cf47dcd0f
commit 00a6dbbe97
1 changed files with 1 additions and 0 deletions

View File

@ -73,6 +73,7 @@ func (s *CPUStats) Gather(acc plugins.Accumulator) error {
totalDelta := total - lastTotal
if totalDelta < 0 {
s.lastStats = times
return fmt.Errorf("Error: current total CPU time is less than previous total CPU time")
}