private void timer1_Tick(object sender, EventArgs e) { List <long> Benchmark = new List <long>(); Stopwatch sw = Stopwatch.StartNew(); frameStatistics1.UpdateStatistics(); frameStatistics2.UpdateStatistics(); Benchmark.Add(sw.ElapsedTicks); frameCanopenCycleLog1.UpdateStatistics(); frameCanopenCycleLog2.UpdateStatistics(); Benchmark.Add(sw.ElapsedTicks); frameMessageMatrix1.UpdateStatistics(); frameMessageMatrix2.UpdateStatistics(); Benchmark.Add(sw.ElapsedTicks); frameMessages1.UpdateStatistics(); frameMessages2.UpdateStatistics(); Benchmark.Add(sw.ElapsedTicks); CanSharkCore.Analyze(); Benchmark.Add(sw.ElapsedTicks); label1.Text = Benchmark[0].ToString(); label2.Text = (Benchmark[1] - Benchmark[0]).ToString(); label3.Text = (Benchmark[2] - Benchmark[1]).ToString(); label4.Text = (Benchmark[3] - Benchmark[2]).ToString(); }
public BoardInfo(IPEndPoint ep) { _Endpoint = ep; _BoardID = CanSharkCore.GetNewBoardId(); CanSharkCore.RegisterBoard(_BoardID, this, 2); }
private void frmMain_FormClosed(object sender, FormClosedEventArgs e) { CanSharkCore.Dispose(); }