C#时间间隔

   System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
   stopwatch.Start();
   stopwatch.Stop();
            TimeSpan ts = stopwatch.Elapsed;
            // Format and display the TimeSpan value.
            string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
                ts.Hours, ts.Minutes, ts.Seconds,
                ts.Milliseconds / 10);
相关文章
相关标签/搜索