小弟现在要做一个显示实时数据的曲线,利用zedGraph控件+timer来实现,现在不知道如何将曲线的横坐标设置成系统时间?
另外,timer空间可以设置的最小时间为1ms,还有没有可以设置更短时间的办法
下面是timer1_Tick的程序。程序很简单,做一个随时间变化的余弦曲线,希望把横坐标修改成系统时间,不要年月日,只显示时分秒
 int i = 0;
        int N = 360;
        double PI = 3.1415926;
        private void timer1_Tick(object sender, EventArgs e)
        { 
            zedGraphControl1.GraphPane.XAxis.Scale.MaxAuto = true;
            //double x = (double)new XDate(DateTime.Now);
            //double y = ran.NextDouble();            double x;
            double y;
              x= i * PI / 180;
              y = Math.Cos(x);
              list.Add(x, y);
              myCurve = zedGraphControl1.GraphPane.AddCurve("", list, Color.DarkGreen, SymbolType.None);
 
            this.zedGraphControl1.AxisChange();
            this.zedGraphControl1.Refresh();
            i +=1;
        }