|
@@ -37,20 +37,22 @@ func init() {
|
|
}
|
|
}
|
|
|
|
|
|
func main() {
|
|
func main() {
|
|
- //go judgeState1()
|
|
|
|
- //go pkg.JudgeLocal()
|
|
|
|
- //go judgeState3()
|
|
|
|
-
|
|
|
|
- var localTurnLength = 2
|
|
|
|
- var cloudTurnLength = 60
|
|
|
|
|
|
+ localTurnLength := 2
|
|
|
|
+ cloudTurnLength := 60
|
|
|
|
+ overallTurnLength := localTurnLength
|
|
|
|
+ //lastCloudStatus := "NONE"
|
|
|
|
|
|
go pkg.GetLocalStatus(&localStatus, localTurnLength)
|
|
go pkg.GetLocalStatus(&localStatus, localTurnLength)
|
|
go pkg.GetCloudStatus(&cloudStatus, cloudTurnLength)
|
|
go pkg.GetCloudStatus(&cloudStatus, cloudTurnLength)
|
|
|
|
|
|
for {
|
|
for {
|
|
- time.Sleep(1 * time.Second)
|
|
|
|
|
|
+ time.Sleep(time.Duration(overallTurnLength) * time.Second)
|
|
fmt.Println("localStatus: ", localStatus)
|
|
fmt.Println("localStatus: ", localStatus)
|
|
fmt.Println("cloudStatus: ", cloudStatus)
|
|
fmt.Println("cloudStatus: ", cloudStatus)
|
|
|
|
+ //if cloudStatus == "UN_CHANGE" {
|
|
|
|
+ // lastCloudStatus = "UN_CHANGE"
|
|
|
|
+ // continue
|
|
|
|
+ //}
|
|
}
|
|
}
|
|
//select {}
|
|
//select {}
|
|
}
|
|
}
|