Ejemplo n.º 1
0
        private void Run(object obj)
        {
            RunHandle handle = (RunHandle)obj;

            while (true)
            {
                handle.Start();
                Thread.Sleep(handle.sleep_time);
            }
        }
Ejemplo n.º 2
0
        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);
        }