private void Run(object obj) { RunHandle handle = (RunHandle)obj; while (true) { handle.Start(); Thread.Sleep(handle.sleep_time); } }
internal void ThreadRun(DelFunc method, int time, string name) { DelFunc del = method; RunHandle handle = new RunHandle(del, time, name); ParameterizedThreadStart pts = new ParameterizedThreadStart(Run); Thread thread = new Thread(pts); thread.Name = name; thread.Start(handle); }