Espere um tempo - Android

Eu quero que meu programa espere 10s no meu tempo verdadeiro, mas não funciona eu tentei usarThread.sleep(10000); mas não é 10s

while (true) {
    for (int i = 0; i < 2; i++) {
        for (int j = 0; j < 5; j++) {
            if (matrixVacancy[i][j] == 1) {
                completeParking(i, j, R.color.vaga_ocupada);
            } else {
                completeParking(i, j, R.color.cor_chao);
            }
        }
    }
    try {
        Thread.sleep(10000);
    } catch (InterruptedException ex) {
    }

    int a, b, c, d, e, f, g, h, i;

    a = (int) (Math.random() * 2); // indice i
    b = (int) (Math.random() * 5); // indice j
    c = (int) (Math.random() * 2); // tem ou nao carro

    d = (int) (Math.random() * 2); // indice i
    e = (int) (Math.random() * 5); // indice j
    f = (int) (Math.random() * 2); // tem ou nao carro

    g = (int) (Math.random() * 2); // indice i
    h = (int) (Math.random() * 5); // indice j
    i = (int) (Math.random() * 2); // tem ou nao carro

    matrixVacancy[a][b] = c;
    matrixVacancy[d][e] = f;
    matrixVacancy[g][h] = i;
}

Como eu posso fazer isso? Para o meu tempo esperar 10s?

questionAnswers(3)

yourAnswerToTheQuestion