The code below when compiled is completed instantly. I would like the counter to add 1 every second. So the program should run for 556 seconds. Every second goes by the counter increase by 1.
var counter = 0
while true {
counter += 1
print(counter)
if counter == 556 {
break
}
}