In my application I am calling third part vendor web-service. I need to delay my thread processing to achieve required throughput supported by vendor webservice.
I have two options 1. Use Thread.Sleep 2. use ScheduledThreadPoolExecutor as mentioned in the post How to start a thread after specified time delay in java
Wanted to know which is better option as we are sending time critical information(Text Message) using Vendor webservice. Any help is appreciated.