diff --git a/example/updater/main.go b/example/updater/main.go index c910a14..b2b944f 100644 --- a/example/updater/main.go +++ b/example/updater/main.go @@ -113,7 +113,7 @@ func updateThenReboot() { defer updater.Close() log.Println("checking time sync") - synced, err := updater.TimeSyncStatus() + synced, err := updater.TimeSynced() if err != nil { log.Fatal(err) } diff --git a/reach/time_sync.go b/reach/time_sync.go index d9f8c96..b4e90eb 100644 --- a/reach/time_sync.go +++ b/reach/time_sync.go @@ -16,8 +16,9 @@ type timeSyncStatus struct { Status bool `json:"status"` } -// TimeSyncStatus returns the ReachRS module time sync status -func (u *Updater) TimeSyncStatus() (bool, error) { +// TimeSynced returns the ReachRS module time synchronization status. +// A true response means that the module has synchronized its clock. +func (u *Updater) TimeSynced() (bool, error) { var err error var synced bool diff --git a/reach/time_sync_test.go b/reach/time_sync_test.go index c6a6682..af81b70 100644 --- a/reach/time_sync_test.go +++ b/reach/time_sync_test.go @@ -18,7 +18,7 @@ func TestClientTimeSync(t *testing.T) { t.Fatal(err) } - _, err := client.TimeSyncStatus() + _, err := client.TimeSynced() if err != nil { t.Error(err) }