shortcut for last update time

This commit is contained in:
Jeff Carr 2025-03-21 19:30:31 -05:00
parent f87da2b041
commit 8ecc16f938
1 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,8 @@
package zoopb
import (
"time"
"go.wit.com/log"
)
@ -17,3 +19,8 @@ func InitMachine() *Machine {
return machine
}
func (m *Machine) SinceLastUpdate() time.Duration {
age := m.Laststamp.AsTime()
return time.Since(age)
}