public static void Start(TimeSpan interval, Action<string> output) { var thread = new Thread(()=> { while(true) { var monitor = new ServicePointMonitor(output); monitor.Print(); Thread.Sleep(interval); } }); thread.IsBackground = true; thread.Start(); }
public static void Start(TimeSpan interval, Action <string> output) { var thread = new Thread(() => { while (true) { var monitor = new ServicePointMonitor(output); monitor.Print(); Thread.Sleep(interval); } }); thread.IsBackground = true; thread.Start(); }