package zoopb import ( "time" "go.wit.com/log" ) // sent via -ldflags var VERSION string var BUILDTIME string func InitMachine() *Machine { machine := new(Machine) if err := machine.ConfigLoad(); err != nil { log.Info("zoopb.ConfigLoad() failed", err) } machine.InitWit() return machine } func (m *Machine) SinceLastUpdate() time.Duration { age := m.Laststamp.AsTime() return time.Since(age) }