using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace TwoCamWPF.Helpers
{
	static class AutoStartDelayer
	{
      //  Timer timer;
		//EventHandler callback_;

		public static void AutoStartDelay(int pause, EventHandler callback)
		{
		//	callback_ = callback;
            Timer timer = null;
            timer = new Timer((_) => { callback(timer, null); timer.Dispose(); }, null, pause, System.Threading.Timeout.Infinite);
			
            //timer.Interval = pause;
            //timer.Enabled = true;
            //timer.Tick += new EventHandler(timer_Tick);
            //timer.Tick += new EventHandler(callback);
		}

        //private void timer_Tick(object sender, EventArgs e)
        //{
        //    timer.Enabled = false;
        //    timer.Tick -= timer_Tick;
        //    timer.Tick -= callback_;
        //}

    }
}
