18 namespace erminas.SmartAPI.Utils
20 internal class TimeOutTracker
22 private readonly DateTime _start;
23 private readonly TimeSpan _timeToWait;
25 internal TimeOutTracker(
int timeoutInMs)
27 _timeToWait =
new TimeSpan(0, 0, 0, 0, timeoutInMs);
28 _start = DateTime.Now;
31 internal TimeOutTracker(TimeSpan timeToWait)
33 _timeToWait = timeToWait;
34 _start = DateTime.Now;
37 internal bool HasTimedOut
39 get {
return DateTime.Now - _start > _timeToWait; }