Files
netbird/client/system/reboot.go
2024-01-17 09:03:41 +01:00

18 lines
294 B
Go

package system
import (
"time"
"github.com/shirou/gopsutil/host"
log "github.com/sirupsen/logrus"
)
func lastReboot() string {
info, err := host.Info()
if err != nil {
log.Errorf("failed to get boot time: %s", err)
return ""
}
return time.Unix(int64(info.BootTime), 0).String()
}