Fix incorrect computation of SecondsSinceNodeStatsUpdate (#3172)

Stats.UpdatedAt is in seconds, but we were loading as nanosecs
This commit is contained in:
David Zhao
2024-11-12 01:13:08 -06:00
committed by GitHub
parent 41fbcec2cd
commit 84cb14695f

View File

@@ -157,5 +157,5 @@ func (l *LocalNodeImpl) SecondsSinceNodeStatsUpdate() float64 {
l.lock.RLock()
defer l.lock.RUnlock()
return time.Since(time.Unix(0, l.node.Stats.UpdatedAt)).Seconds()
return time.Since(time.Unix(l.node.Stats.UpdatedAt, 0)).Seconds()
}