Q:

C# Ping.Send() Indefinitely, and will this slow down the computer significantly

In short, I have 2 main questions:
1 - Is there any possible way to use the Send() method from the Ping class indefinitely?
2 - Will this cause the computer to significantly slow down?
I'm making a program that will in short establish an average ping to a certain server and inform the user whenever the ping(ms) increases above a certain point over the average.
Now, to accomplish this I would naturally have to have the program ping said server forever (until the program closes of course).
If there is no way I could do this forever, I can only think of having an unreasonably large for loop or a while (true) {} loop.
I'm just concerned this will cause significant strain on the user's computer.
Can this be confirmed or am I just too cautious?

A:

If you want to be super-efficient, use Async IO - that way your application can re-use existing threads without needing to handle blocking calls (and thus needlessly consuming threads):
public async Task PingForeverAsync( IPAddress host )
{
    Ping ping = new Ping();
    while( true )
    {
        Task interval = Task.Delay( 5000 );
        Task<PingReply> pingTask = ping.SendAsync( host, 5000 );

        PingReply reply = await pingTask.ConfigureAwait(false);
        // (Measure the reply time here and send out notification if necessary)

        await interval.ConfigureAwait(false); // await the 5000ms interval delay
    }
}

