Beispiel #1
0
 public static void tickmany(object o)
 {
     //System.Console.WriteLine("tick");
     double[] signal = new double[10];
     while (!UlazniBuffer.ReadMany(out signal, 1000))
     {
         ;
     }
     for (int i = 0; i < 1000; i++)
     {
         //Console.Write("3");
         if (signal[i] == Double.PositiveInfinity)
         {
             //stop the program
             timer.Change(Timeout.Infinite, 1);
             UlazniBuffer.Clear();
             //System.Console.WriteLine("Exiting");
             return;
         }
         else
         {
             MessageBox.Show(signal[i].ToString());
         }
     }
 }
Beispiel #2
0
        public void tick2(object o) //static
        {
            //System.Console.WriteLine("tick");
            double[] signal = new double[40000]; //10
            for (int i = 0; i < 40000; i++)      // 10
            {
                while (!UlazniBuffer.ReadOne(out signal[i]))
                {
                    ;
                }
                //Console.Write("3");

                if (signal[i] == Double.PositiveInfinity)
                {
                    //stop the program
                    timer.Change(Timeout.Infinite, 1);
                    UlazniBuffer.Clear();
                    //System.Console.WriteLine("Exiting");
                    return;
                }

                napon2.Add(signal[i]);
            }
        }