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();
        }
Beispiel #2
0
        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();
        }