Windows Forms高级界面组件-Timer控件实例
显示计算机开始运行的时间和运行了多久
DateTime dt = DateTime.Now.AddMilliseconds(0 - Environment.TickCount);
Console.WriteLine("开机时间:" + dt.ToString());
string strTime=(Environment.TickCount/1000.0/60.0/60.0).ToString();
Console.WriteLine("开机时长:" + strTime);