This commit is contained in:
Mateusz Piątkowski 2022-12-09 15:48:51 +01:00 committed by Robert Bendun
parent 32765f9e2d
commit 5e67bf9a2f

View File

@ -83,7 +83,6 @@ func timesync(hosts []string) []client {
wg.Wait() wg.Wait()
close(responses) close(responses)
fmt.Println("joł")
clients := make([]client, 0, len(hosts)) clients := make([]client, 0, len(hosts))
for client := range responses { for client := range responses {
clients = append(clients, client) clients = append(clients, client)
@ -166,7 +165,7 @@ func main() {
if strings.HasPrefix(resp, "start") { if strings.HasPrefix(resp, "start") {
startTimeString := strings.TrimSpace(resp[len("start"):]) startTimeString := strings.TrimSpace(resp[len("start"):])
startTime := int64(0) startTime := int64(0)
fmt.Scanf(startTimeString, "%d", &startTime) fmt.Sscanf(startTimeString, "%d", &startTime)
time.Sleep(time.Duration(startTime) * time.Millisecond) time.Sleep(time.Duration(startTime) * time.Millisecond)
log.Println("Started #start") log.Println("Started #start")
continue continue