So here is the breakdown of my program. It is a tool that measures latency to a server on a specified port.
So currently I have a manual check to find the server on a specific port. Then I ping this server every 500 ms and update some GUI elements based on this ping.
I have the pinging done in a background thread and I call thread.sleep(500) after every ping.
Would it be better to use timers for these events?
I want to check for the server every 5 seconds, and ping every 500 ms.