コード例 #1
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();
        }
コード例 #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();
        }