Here is my code
while (true) {
try {
Thread.sleep(5 * 60 * 1000);
processData();// data processing job
} catch (InterruptedException e) {
SystemMessageBillPay.getInstance().writeMessage("ERROR: CEB.run() - " + e.getMessage());
} catch (NumberFormatException e) {
SystemMessageBillPay.getInstance().writeMessage("ERROR: CEB.run() - " + e.getMessage());
}
}
to this
"Thread.sleep(5 * 60 * 1000);"
code inspector give warning
"Invoking Thread.sleep in loop can cause performance problems"
What should be the code to prevent this warning