Issue
I wrote a little servlet (netbeans/payara) that delivers locally stored images for map creation to test my map compositing software.
Works perfectly, but a little too perfect due to the very fast response time. I would like to reduce my response time to better simulate a real world scenario with slow servers or bad connectivity.
Is there a good way to achieve this?
Thread.sleep()
would just block one thread, so that doesn't really help...
Solution
Thread.sleep()
won't make sleep just one thread. It will make sleep every thread that executes that code.
Answered By - Andres
Answer Checked By - Mary Flores (JavaFixing Volunteer)