var turn = 0
for pos in self.history {
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + .microseconds(Int(1000000 * turn))) {
//////////
//put stone in board
////////////
}
turn += 1
}
I use DispatchQueue.main.asyncAfter method to set stones with exact interval time in the board.
it works well with small stones.(1 stone per 1 sec) but more and more stones in the board, it becomes not working exactly.(2 stones per 2 sec: 2 stones are put simultaneously)
why this error happens?