Пример #1
0
 private void Timer2_Tick(object sender, EventArgs e)
 {
     if (FLAG_DISPAY == "1")
     {
         // Start a Stopwatch
         Stopwatch stopwatch = new Stopwatch();
         stopwatch.Start();
         fig1.PlotData(time_series);
         fig1.Show();
         FLAG_DISPAY = "";
         //          Debug.WriteLine("*");
     }
 }
        void DISPLAY_TIME_0()
        {
            double[] TSAMPL_tmp      = new double[FFT_SIZE];
            double[] time_series_tmp = new double[FFT_SIZE];

            if (data0 != null)
            {
                Task a = Task.Factory.StartNew(() => { Array.Copy(data0.TSAMPL, TSAMPL_tmp, FFT_SIZE); });
                Task b = Task.Factory.StartNew(() => { Array.Copy(data0.time_series, time_series_tmp, FFT_SIZE); });
                Task.WaitAll(new Task[] { a, b });

                fig_TIME0.PlotData(TSAMPL_tmp, time_series_tmp);
                fig_TIME0.Show();
            }
        }