diff options
| author | Jeff Carr <[email protected]> | 2025-03-21 19:30:31 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-22 09:45:49 -0500 |
| commit | 8ecc16f938a2bacfb4c5a4cb7a212d7b2969f088 (patch) | |
| tree | 60812e03d8f4a2716f01a6960bfbc377fdfca828 | |
| parent | f87da2b041b6a1f0464d493e2f1b7fdfc457cf58 (diff) | |
shortcut for last update timev0.0.48
| -rw-r--r-- | main.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) +} |
