Exemplo n.º 1
0
 public IntervalTimer(float interval, bool shouldInvokeOnStart = false, ITimeGetter timeGetter = null)
 {
     _interval            = interval;
     _stopWatch           = new StopWatch(timeGetter);
     IsRunning            = false;
     _shouldInvokeOnStart = shouldInvokeOnStart;
 }
Exemplo n.º 2
0
        public ChartController(ITimerAccess timerAccess, ITimeBuilder timeBuilder, ITimeGetter timeGetter, IRequestReader requestReader, ITimerCalculator timerCalculator)
        {
            _timerAccess     = timerAccess;
            _timeBuilder     = timeBuilder;
            _timeGetter      = timeGetter;
            _requestReader   = requestReader;
            _timerCalculator = timerCalculator;

            _timeZoneInfo = _timeBuilder.GetTimeZoneInfo(_requestReader.Read(TypeScript.HttpHeaders.Request.CurrentTimeZone));
        }
Exemplo n.º 3
0
 public StopWatch(ITimeGetter timeGetter = null)
 {
     IsRunning   = false;
     _timeGetter = timeGetter ?? DefaultTimeGetter.Instance;
 }
Exemplo n.º 4
0
 public PausableStopWatch(ITimeGetter timeGetter)
 {
     _runWatch   = new StopWatch(timeGetter);
     _pauseWatch = new StopWatch(timeGetter);
 }
Exemplo n.º 5
0
 public TimeBuilder(ITimeGetter timeGetter)
 {
     _timeGetter = timeGetter;
 }
Exemplo n.º 6
0
 public ExpirationTimer(float time, ITimeGetter timeGetter = null)
 {
     _intervalTimer              = new IntervalTimer(time, false, timeGetter);
     _intervalTimer.OnTickTimer += TimerTick;
 }
Exemplo n.º 7
0
 public void Setup()
 {
     _timeGetter = Substitute.For <ITimeGetter>();
     _sut        = new TimeBuilder(_timeGetter);
 }