using System.Diagnostics; namespace AipGateway.API.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); } } }