1 write to _timeProvider
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
TimeoutControlTests.cs (1)
20_timeProvider = new FakeTimeProvider();
72 references to _timeProvider
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (72)
TimeoutControlTests.cs (72)
21_timeoutControl = new TimeoutControl(_mockTimeoutHandler.Object, _timeProvider); 31var now = _timeProvider.GetTimestamp(); 34_timeoutControl.Tick(_timeProvider.GetTimestamp(now + 2, Heartbeat.Interval)); 66var now = _timeProvider.GetTimestamp(); 73now += _timeProvider.TimestampFrequency; 81now += _timeProvider.TimestampFrequency; 83now += _timeProvider.TimestampFrequency; 98var now = _timeProvider.GetTimestamp(); 105now += _timeProvider.TimestampFrequency; 107now += _timeProvider.TimestampFrequency; 112now += _timeProvider.TimestampFrequency; 120now += _timeProvider.TimestampFrequency; 128now += _timeProvider.TimestampFrequency; 136now += _timeProvider.TimestampFrequency; 144now += _timeProvider.TimestampFrequency; 164_timeProvider.Advance(TimeSpan.FromSeconds(1)); 165_timeoutControl.Tick(_timeProvider.GetTimestamp()); 166_timeProvider.Advance(TimeSpan.FromSeconds(1)); 167_timeoutControl.Tick(_timeProvider.GetTimestamp()); 168_timeProvider.Advance(TimeSpan.FromSeconds(1)); 170_timeoutControl.Tick(_timeProvider.GetTimestamp()); 173_timeProvider.Advance(TimeSpan.FromSeconds(0.5)); 177_timeProvider.Advance(TimeSpan.FromSeconds(0.5)); 178_timeoutControl.Tick(_timeProvider.GetTimestamp()); 181_timeProvider.Advance(TimeSpan.FromSeconds(2)); 182_timeoutControl.Tick(_timeProvider.GetTimestamp()); 188_timeProvider.Advance(TimeSpan.FromSeconds(0.5)); 192_timeProvider.Advance(TimeSpan.FromSeconds(1.0)); 193_timeoutControl.Tick(_timeProvider.GetTimestamp()); 194_timeProvider.Advance(TimeSpan.FromSeconds(.5)); 195_timeoutControl.Tick(_timeProvider.GetTimestamp()); 201_timeProvider.Advance(TimeSpan.FromSeconds(1)); 202_timeoutControl.Tick(_timeProvider.GetTimestamp()); 220_timeProvider.Advance(TimeSpan.FromSeconds(1)); 221_timeoutControl.Tick(_timeProvider.GetTimestamp()); 222_timeProvider.Advance(TimeSpan.FromSeconds(1)); 223_timeoutControl.Tick(_timeProvider.GetTimestamp()); 230_timeProvider.Advance(TimeSpan.FromSeconds(0.25)); 234_timeProvider.Advance(TimeSpan.FromSeconds(0.25)); 238_timeProvider.Advance(TimeSpan.FromSeconds(0.5)); 240_timeoutControl.Tick(_timeProvider.GetTimestamp()); 246_timeProvider.Advance(TimeSpan.FromSeconds(1)); 247_timeoutControl.Tick(_timeProvider.GetTimestamp()); 268_timeProvider.Advance(TimeSpan.FromSeconds(3)); 270_timeoutControl.Tick(_timeProvider.GetTimestamp()); 276_timeProvider.Advance(TimeSpan.FromSeconds(2) + Heartbeat.Interval + TimeSpan.FromTicks(1)); 277_timeoutControl.Tick(_timeProvider.GetTimestamp()); 291var now = _timeProvider.GetTimestamp(); 299now += _timeProvider.TimestampFrequency; 302now += _timeProvider.TimestampFrequency; 310now += _timeProvider.TimestampFrequency; 324now += _timeProvider.TimestampFrequency; 337var now = _timeProvider.GetTimestamp(); 344now += _timeProvider.TimestampFrequency; 347now += _timeProvider.TimestampFrequency; 352now += _timeProvider.TimestampFrequency * 2; 360now += _timeProvider.TimestampFrequency; 363now += _timeProvider.TimestampFrequency; 470_timeProvider.Advance(TimeSpan.FromTicks(1)); 471_timeoutControl.Tick(_timeProvider.GetTimestamp()); 489_timeProvider.Advance(TimeSpan.FromSeconds(4) + Heartbeat.Interval + TimeSpan.FromTicks(1)); 490_timeoutControl.Tick(_timeProvider.GetTimestamp()); 515_timeProvider.Advance(TimeSpan.FromSeconds(1)); 517_timeoutControl.Tick(_timeProvider.GetTimestamp()); 522var endTime = _timeProvider.GetTimestamp(timeSpan); 524while (_timeProvider.GetTimestamp(Heartbeat.Interval) < endTime) 526_timeProvider.Advance(Heartbeat.Interval); 527_timeoutControl.Tick(_timeProvider.GetTimestamp()); 530_timeProvider.Advance(_timeProvider.GetElapsedTime(_timeProvider.GetTimestamp(), endTime)); 531_timeoutControl.Tick(_timeProvider.GetTimestamp());