using System.Diagnostics; namespace EmbedIO.Internal { /// /// Represents a wrapper around Stopwatch. /// public sealed class TimeKeeper { private static readonly Stopwatch Stopwatch = Stopwatch.StartNew(); private readonly long _start; /// /// Initializes a new instance of the class. /// public TimeKeeper() { _start = Stopwatch.ElapsedMilliseconds; } /// /// Gets the elapsed time since the class was initialized. /// public long ElapsedTime => Stopwatch.ElapsedMilliseconds - _start; } }