diff --git a/host/host.go b/host/host.go index ee94863..b6be3a9 100644 --- a/host/host.go +++ b/host/host.go @@ -69,6 +69,12 @@ func EnableBootTimeCache(enable bool) { enableBootTimeCache = enable } +// RefreshBootTimeCache manually refreshes the cached BootTime value. +func RefreshBootTimeCache(ctx context.Context) error { + _, err := common.BootTimeWithContext(ctx, false) + return err +} + func Info() (*InfoStat, error) { return InfoWithContext(context.Background()) }