Fix incorrect computation of SecondsSinceNodeStatsUpdate (#3172)
Stats.UpdatedAt is in seconds, but we were loading as nanosecs
This commit is contained in:
+1
-1
@@ -157,5 +157,5 @@ func (l *LocalNodeImpl) SecondsSinceNodeStatsUpdate() float64 {
|
|||||||
l.lock.RLock()
|
l.lock.RLock()
|
||||||
defer l.lock.RUnlock()
|
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()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user