Hi,
没有这样特定的API,不过你可以使用DateTime类来得到当前时间的方法计算执行时间,比如得到两次时间你可以这样写:
DateTime time = new DateTime();
time = DateTime.Now;
Debug.WriteLine("{0}:{1}", time.Second, time.Millisecond);
time = DateTime.Now;
Debug.WriteLine("{0}:{1}",time.Second,time.Millisecond);
Aaron Xue [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
