No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

StopWatch.cs 547B

12345678910111213141516171819202122
  1. using System.Diagnostics;
  2. namespace Unity.PerformanceTesting.Meters
  3. {
  4. /// <summary>
  5. /// Takes use of System.Diagnostics.Stopwatch to provide stopwatch functionality implementing IStopWatch
  6. /// </summary>
  7. internal class StopWatch : IStopWatch
  8. {
  9. private readonly Stopwatch m_StopWatch = Stopwatch.StartNew();
  10. public void Start()
  11. {
  12. m_StopWatch.Restart();
  13. }
  14. public double Split()
  15. {
  16. return m_StopWatch.Elapsed.TotalMilliseconds;
  17. }
  18. }
  19. }