Stopwatch.cs 297 B

12345678910111213141516
  1. using System.Diagnostics;
  2. namespace 测试
  3. {
  4. internal class Stopwatch1
  5. {
  6. public Stopwatch1()
  7. {
  8. var a = new Stopwatch();
  9. a.Start();
  10. Thread.Sleep(5000);
  11. a.Stop();
  12. var b = a.ElapsedMilliseconds;
  13. }
  14. }
  15. }