ScheduledExecutorService blinkRate = Executors.newSingleThreadScheduledExecutor();
blinkRate.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
if(blink_count < 10 && blink_count > 0){
//sleep the thread for 10 minutes
}
}
}, 0, 20, TimeUnit.SECONDS);