I've tried to make a little applet using C++ with VS2015. However I have ran into an issue that has been confusing me. The GUI is designed to call a function to get the ping of a server. But when I try to loop it the program freezes and does not accept any input. So my question is how can I make the program run the function without freezing it.