Skip to content

Commit

Permalink
refactor: Move tfchain check to the very last as a fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
xmonader committed Nov 3, 2024
1 parent 6f832d7 commit b259c9f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/perf/healthcheck/ntp.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ func getCurrentUTCTime(zcl zbus.Client) (time.Time, error) {

// List of time servers
var timeServers = []TimeServer{
{
Name: "tfchain",
Func: func() (time.Time, error) {
return getTimeChainWithZCL(zcl)
},
},
{
Name: "worldtimeapi",
Func: getWorldTimeAPI,
Expand All @@ -96,6 +90,12 @@ func getCurrentUTCTime(zcl zbus.Client) (time.Time, error) {
Name: "timeapi.io",
Func: getTimeAPI,
},
{
Name: "tfchain",
Func: func() (time.Time, error) {
return getTimeChainWithZCL(zcl)
},
},
}
for _, server := range timeServers {
utcTime, err := server.Func()
Expand Down

0 comments on commit b259c9f

Please sign in to comment.