Ejemplo n.º 1
0
        public static void Pause(this StarterConfig config, int seconds)
        {
            long end = Factory.TickCount + (seconds * 1000);
            long current;

            while ((current = Factory.TickCount) < end)
            {
                Application.DoEvents();
                config.Catch();
                Thread.Sleep(1);
            }
        }
Ejemplo n.º 2
0
        public static void WaitComplete(this StarterConfig config, int seconds, Func <bool> onCompleteCallback)
        {
            long end = Factory.TickCount + (seconds * 1000);

            while (Factory.TickCount < end)
            {
                config.Catch();
                if (onCompleteCallback != null && onCompleteCallback())
                {
                    return;
                }
                Thread.Sleep(1);
            }
        }