12345678910111213141516 |
- using System.Diagnostics;
- namespace AipGateway.AIP.Service.Utils
- {
- public static class TimeUtils
- {
- public static long GetElapsedMilliseconds(long start, long stop)
- {
- return (long)((stop - start) * 1000 / (double)Stopwatch.Frequency);
- }
- public static long GetElapsedMilliseconds(long start)
- {
- return (long)((Stopwatch.GetTimestamp() - start) * 1000 / (double)Stopwatch.Frequency);
- }
- }
- }
|