Skip to content

Commit

Permalink
Add time to spawn
Browse files Browse the repository at this point in the history
  • Loading branch information
qu35t-code committed Jan 27, 2024
1 parent 2250876 commit 49ed17d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ func coreStartCmd(machineChoosen string, machineID string) (string, error) {
}

ip := "Undefined"
startTime := time.Now()
switch {
case machineType == "release":
s := spinner.New(spinner.CharSets[14], 100*time.Millisecond)
Expand All @@ -125,7 +126,7 @@ func coreStartCmd(machineChoosen string, machineID string) (string, error) {
s.Stop()
break LoopRelease
}
time.Sleep(6 * time.Second)
time.Sleep(3 * time.Second)
}
}
case userSubscription == "vip+":
Expand All @@ -151,7 +152,7 @@ func coreStartCmd(machineChoosen string, machineID string) (string, error) {
s.Stop()
break Loop
}
time.Sleep(6 * time.Second)
time.Sleep(3 * time.Second)
}
}
default:
Expand All @@ -162,8 +163,8 @@ func coreStartCmd(machineChoosen string, machineID string) (string, error) {
}
ip = activeMachineData["ip"].(string)
}

message = fmt.Sprintf("%s\nTarget: %s", message, ip)
tts := time.Since(startTime)
message = fmt.Sprintf("%s\nTarget: %s\nTime to spawn was %s !", message, ip, tts)
return message, nil
}

Expand Down

0 comments on commit 49ed17d

Please sign in to comment.