new Thread(() -> {
while (true) {
if (hour == 9 || (hour == 10 && min <= 20) ) {
txt.setTextColor(Color.GREEN);
}
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}).start();