示例#1
0
        private void CheckDevices(Configuration configuration, FOI foi)
        {
            AlgorithmFactory algorithmFactory = AlgorithmFactory.GetFactory(configuration.Algorithm);
            Algorithm        algorithm        = algorithmFactory.CreateAlgorithm(foi);

            new Thread(() =>
            {
                Thread.CurrentThread.IsBackground = false;

                for (int i = 0; i < configuration.NumberOfThreadCycles; i++)
                {
                    algorithm.Run(configuration.ThreadCycleDuration ?? 1);
                }

                ShowStatistics(foi);

                Console.WriteLine("Program je završio. Pritisnite tipku za izlaz.");
                Console.ReadKey();
            }).Start();
        }