46 instantiations of Timer
dotnet-svcutil-lib (11)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\InputQueue.cs (2)
814_timer = new Timer(new TimerCallback(s_timerCallback), this, timeout, TimeSpan.FromMilliseconds(-1)); 871_timer = new Timer(new TimerCallback(s_timerCallback), this, timeout, TimeSpan.FromMilliseconds(-1));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BufferedConnection.cs (1)
96_flushTimer = new Timer(new TimerCallback(new Action<object>(OnFlushTimer)), null, TimeSpan.FromMilliseconds(-1), TimeSpan.FromMilliseconds(-1));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrSocketConnection.cs (2)
65_sendTimer = new Timer(s_onSendTimeout, this, TimeSpan.FromMilliseconds(-1), TimeSpan.FromMilliseconds(-1)); 83_receiveTimer = new Timer(s_onReceiveTimeout, this, TimeSpan.FromMilliseconds(-1), TimeSpan.FromMilliseconds(-1));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\IdlingCommunicationPool.cs (1)
200_idleTimer = new Timer(new TimerCallback(new Action<object>(s_onIdle)), this, _idleTimeout, TimeSpan.FromMilliseconds(-1));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\LifetimeManager.cs (1)
288_timer = new Timer(new TimerCallback(new Action<object>(TimeoutCallback)), this, timeout, TimeSpan.FromMilliseconds(-1));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (2)
2278_timer = new Timer(new TimerCallback(s_timerCallback), this, timeout, TimeSpan.FromMilliseconds(-1)); 2345_timer = new Timer(new TimerCallback(GetTimerCallback()), this, idle, TimeSpan.FromMilliseconds(-1));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (1)
824_timer = new Timer(new TimerCallback(AsyncDuplexRequest.s_timerCallback), this, timeout, TimeSpan.FromMilliseconds(-1));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\TimeBoundedCache.cs (1)
106_purgingTimer = new Timer(new TimerCallback(PurgeCallback), this, _purgeInterval, TimeSpan.FromMilliseconds(-1));
Infrastructure.Common (1)
xunit\WcfTestCase.cs (1)
56timer = new Timer((s) => Environment.FailFast($"Test timed out after duration {_failFastDuration}"),
Microsoft.AspNetCore.Http.Connections (1)
src\Shared\NonCapturingTimer\NonCapturingTimer.cs (1)
30return new Timer(callback, state, dueTime, period);
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\NonCapturingTimer\NonCapturingTimer.cs (1)
30return new Timer(callback, state, dueTime, period);
Microsoft.AspNetCore.SignalR.Client.Core (1)
src\Shared\NonCapturingTimer\NonCapturingTimer.cs (1)
30return new Timer(callback, state, dueTime, period);
Microsoft.AspNetCore.SignalR.StackExchangeRedis (1)
src\Shared\NonCapturingTimer\NonCapturingTimer.cs (1)
30return new Timer(callback, state, dueTime, period);
Microsoft.AspNetCore.WebSockets.ConformanceTests (1)
Autobahn\AutobahnTester.cs (1)
38var pinger = new Timer(state => Pinger((CancellationToken)state), pingCts.Token, TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(10));
Microsoft.Extensions.Diagnostics (1)
Metrics\DebugConsoleMetricListener.cs (1)
24_timer = new Timer(OnTimer, null, Timeout.Infinite, Timeout.Infinite);
Microsoft.Extensions.Diagnostics.HealthChecks (1)
src\Shared\NonCapturingTimer\NonCapturingTimer.cs (1)
30return new Timer(callback, state, dueTime, period);
Microsoft.Extensions.FileProviders.Physical (1)
src\libraries\Common\src\Extensions\NonCapturingTimer\NonCapturingTimer.cs (1)
28return new Timer(callback, state, dueTime, period);
Microsoft.Extensions.Http (1)
src\libraries\Common\src\Extensions\NonCapturingTimer\NonCapturingTimer.cs (1)
28return new Timer(callback, state, dueTime, period);
Microsoft.Extensions.ML (1)
ModelLoaders\UriModelLoader.cs (1)
122_reloadTimer = new Timer(ReloadTimerTick, this, Convert.ToInt32(_timerPeriod.Value.TotalMilliseconds), Timeout.Infinite);
Microsoft.ML.AutoML (2)
Experiment\Experiment.cs (2)
124_maxExperimentTimeTimer = new Timer( 139_mainContextCanceledTimer = new Timer(new TimerCallback(MainContextCanceledEvent), null, 1000, 1000);
PresentationCore (1)
System\IO\Packaging\PackWebResponse.cs (1)
94_timeoutTimer = new Timer(new TimerCallback(TimeoutCallback), null, innerRequest.Timeout, Timeout.Infinite);
System.ComponentModel.TypeConverter (1)
System\Timers\Timer.cs (1)
141_timer = new Threading.Timer(_callback, _cookie, Timeout.Infinite, Timeout.Infinite);
System.Data.Odbc (2)
Common\System\Data\ProviderBase\DbConnectionPool.cs (1)
442Timer t = new Timer(new TimerCallback(this.ErrorCallback), null, Timeout.Infinite, Timeout.Infinite);
src\libraries\Common\src\System\Data\Common\AdapterUtil.Drivers.cs (1)
24return new Timer(callback, state, dueTime, period);
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\AggregationManager.cs (1)
184_pollingTimer = new Timer(CollectOnTimer, null, (int)delayTime.TotalMilliseconds, 0);
System.Net.HttpListener (1)
System\Net\Managed\HttpConnection.cs (1)
103_timer = new Timer(OnTimeout, null, Timeout.Infinite, Timeout.Infinite);
System.Net.Mail (1)
System\Net\Mail\SmtpClient.cs (1)
491timer = new Timer(new TimerCallback(TimeOutCallback), null, Timeout, Timeout);
System.Runtime.Caching (2)
System\Runtime\Caching\CacheExpires.cs (1)
857timer = new Timer(new TimerCallback(this.TimerCallback), null,
System\Runtime\Caching\MemoryCacheStatistics.cs (1)
182timer = new Timer(new TimerCallback(CacheManagerTimerCallback), null, _configPollingInterval, _configPollingInterval);
System.ServiceModel.NetFramingBase (2)
System\ServiceModel\Channels\BufferedConnection.cs (1)
100_flushTimer = new Timer(new TimerCallback(OnFlushTimer), this, _flushTimeout, Timeout.Infinite);
System\ServiceModel\Channels\IdlingCommunicationPool.cs (1)
183_idleTimer = new Timer(new TimerCallback(new Action<object>(s_onIdle)), this, _idleTimeout, Timeout.InfiniteTimeSpan);
System.ServiceModel.UnixDomainSocket (1)
System\ServiceModel\Channels\SocketConnection.cs (1)
736return new Timer(callback, this, Timeout.Infinite, Timeout.Infinite);
System.Threading.RateLimiting (4)
System\Threading\RateLimiting\FixedWindowRateLimiter.cs (1)
78_renewTimer = new Timer(Replenish, this, _options.Window, _options.Window);
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (1)
92_renewTimer = new Timer(Replenish, this, ReplenishmentPeriod, ReplenishmentPeriod);
System\Threading\RateLimiting\TimerAwaitable.cs (1)
55_timer = new Timer(static state =>
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (1)
86_renewTimer = new Timer(Replenish, this, _options.ReplenishmentPeriod, _options.ReplenishmentPeriod);
System.Threading.Tasks.Dataflow (1)
Base\DataflowBlock.cs (1)
1065target._timer = new Timer(
System.Transactions.Local (5)
System\Transactions\TransactionScope.cs (4)
137_scopeTimer = new Timer( 223_scopeTimer = new Timer( 305_scopeTimer = new Timer( 477_scopeTimer = new Timer(
System\Transactions\TransactionTable.cs (1)
149_timer = new Timer(new TimerCallback(ThreadTimer), null, Timeout.Infinite, _timerInterval);
94 references to Timer
dotnet-svcutil-lib (13)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\InputQueue.cs (2)
802private Timer _timer; 865private Timer _timer;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BufferedConnection.cs (1)
18private Timer _flushTimer;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrSocketConnection.cs (4)
35private Timer _receiveTimer; 37private Timer _sendTimer; 54private Timer SendTimer 72private Timer ReceiveTimer
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\IdlingCommunicationPool.cs (1)
106private Timer _idleTimer;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\LifetimeManager.cs (1)
274private Timer _timer;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (2)
2267private Timer _timer; 2336private readonly Timer _timer;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (1)
812private Timer _timer;
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\TimeBoundedCache.cs (1)
24private Timer _purgingTimer;
Infrastructure.Common (1)
xunit\WcfTestCase.cs (1)
53Timer timer = null;
Microsoft.AspNetCore.Http.Connections (1)
src\Shared\NonCapturingTimer\NonCapturingTimer.cs (1)
16public static Timer Create(TimerCallback callback, object? state, TimeSpan dueTime, TimeSpan period)
Microsoft.AspNetCore.Shared.Tests (2)
NonCapturingTimerTest.cs (1)
23var timer = NonCapturingTimer.Create((_) =>
src\Shared\NonCapturingTimer\NonCapturingTimer.cs (1)
16public static Timer Create(TimerCallback callback, object? state, TimeSpan dueTime, TimeSpan period)
Microsoft.AspNetCore.SignalR.Client.Core (2)
src\Shared\NonCapturingTimer\NonCapturingTimer.cs (1)
16public static Timer Create(TimerCallback callback, object? state, TimeSpan dueTime, TimeSpan period)
src\SignalR\common\Shared\TimerAwaitable.cs (1)
15private Timer? _timer;
Microsoft.AspNetCore.SignalR.StackExchangeRedis (2)
Internal\AckHandler.cs (1)
12private readonly Timer _timer;
src\Shared\NonCapturingTimer\NonCapturingTimer.cs (1)
16public static Timer Create(TimerCallback callback, object? state, TimeSpan dueTime, TimeSpan period)
Microsoft.AspNetCore.WebSockets.ConformanceTests (1)
Autobahn\AutobahnTester.cs (1)
38var pinger = new Timer(state => Pinger((CancellationToken)state), pingCts.Token, TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(10));
Microsoft.Extensions.Diagnostics (1)
Metrics\DebugConsoleMetricListener.cs (1)
15private readonly Timer _timer;
Microsoft.Extensions.Diagnostics.HealthChecks (7)
HealthCheckPublisherHostedService.cs (6)
26private List<Timer>? _timers; 94foreach (var timer in _timers) 105private List<Timer> CreateTimers() 114var timers = new List<Timer>(delayPeriodGroups.Count); 117var timer = CreateTimer(group); 124private Timer CreateTimer((TimeSpan Delay, TimeSpan Period) timerOptions)
src\Shared\NonCapturingTimer\NonCapturingTimer.cs (1)
16public static Timer Create(TimerCallback callback, object? state, TimeSpan dueTime, TimeSpan period)
Microsoft.Extensions.FileProviders.Physical (3)
PhysicalFilesWatcher.cs (2)
37private Timer? _timer; 40private readonly Func<Timer> _timerFactory;
src\libraries\Common\src\Extensions\NonCapturingTimer\NonCapturingTimer.cs (1)
14public static Timer Create(TimerCallback callback, object state, TimeSpan dueTime, TimeSpan period)
Microsoft.Extensions.Http (3)
ActiveHandlerTrackingEntry.cs (1)
19private Timer? _timer;
DefaultHttpClientFactory.cs (1)
41private Timer? _cleanupTimer;
src\libraries\Common\src\Extensions\NonCapturingTimer\NonCapturingTimer.cs (1)
14public static Timer Create(TimerCallback callback, object state, TimeSpan dueTime, TimeSpan period)
Microsoft.Extensions.ML (1)
ModelLoaders\UriModelLoader.cs (1)
28private Timer _reloadTimer;
Microsoft.Extensions.TimeProvider.Testing.Tests (4)
TimerTests.cs (4)
138using var t = new Timer(new FakeTimeProvider(), new TimerCallback(EmptyTimerTarget), null); 150using var t = new Timer(new FakeTimeProvider(), new TimerCallback(EmptyTimerTarget), null); 162var t = new Timer(new FakeTimeProvider(), new TimerCallback(EmptyTimerTarget), null); 173var t = new Timer(new FakeTimeProvider(), new TimerCallback(EmptyTimerTarget), null);
Microsoft.ML.AutoML (2)
Experiment\Experiment.cs (2)
34private Timer _maxExperimentTimeTimer; 35private Timer _mainContextCanceledTimer;
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
1184[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Timer))]
netstandard (1)
netstandard.cs (1)
2147[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Timer))]
PresentationCore (1)
System\IO\Packaging\PackWebResponse.cs (1)
932private Timer _timeoutTimer; // used if Timeout specified
System.ComponentModel.TypeConverter (1)
System\Timers\Timer.cs (1)
25private Threading.Timer? _timer;
System.Data.Odbc (9)
Common\System\Data\ProviderBase\DbConnectionPool.cs (6)
123private Timer? _errorTimer; 125private Timer? _cleanupTimer; 377private Timer CreateCleanupTimer() 442Timer t = new Timer(new TimerCallback(this.ErrorCallback), null, Timeout.Infinite, Timeout.Infinite); 569Timer? t = _errorTimer; 1132Timer? t = _cleanupTimer;
src\libraries\Common\src\System\Data\Common\AdapterUtil.Drivers.cs (1)
11internal static Timer UnsafeCreateTimer(TimerCallback callback, object? state, int dueTime, int period)
src\libraries\Common\src\System\Data\ProviderBase\DbConnectionFactory.cs (2)
18private readonly Timer _pruningTimer; 110private Timer CreatePruningTimer() =>
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\Metrics\AggregationManager.cs (1)
32private Timer? _pollingTimer;
System\Diagnostics\Metrics\RuntimeMetrics.cs (1)
118() => Timer.ActiveCount,
System.Net.HttpListener (1)
System\Net\Managed\HttpConnection.cs (1)
64private readonly Timer _timer;
System.Net.Mail (1)
System\Net\Mail\SmtpClient.cs (1)
444Timer? timer = null;
System.Private.CoreLib (11)
src\libraries\Common\src\System\TimeProvider.cs (3)
16/// and a timer based on <see cref="Timer"/>. 171/// <summary>Thin wrapper for a <see cref="Timer"/>.</summary> 239/// provided by <see cref="TimeProvider"/> which uses <see cref="DateTimeOffset.UtcNow"/>, <see cref="TimeZoneInfo.Local"/>, <see cref="Stopwatch"/>, and <see cref="Timer"/>.
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\RuntimeEventSource.cs (1)
99_timerCounter ??= new PollingCounter("active-timer-count", this, () => Timer.ActiveCount) { DisplayName = "Number of Active Timers" };
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (3)
33/// <summary>Delegate used with <see cref="Timer"/> to trigger cancellation of a <see cref="CancellationTokenSource"/>.</summary> 163if (totalMilliseconds < -1 || totalMilliseconds > Timer.MaxSupportedTimeout) 380if (totalMilliseconds < -1 || totalMilliseconds > Timer.MaxSupportedTimeout)
src\libraries\System.Private.CoreLib\src\System\Threading\PeriodicTimer.cs (1)
113if ((ms >= 1 && ms <= Timer.MaxSupportedTimeout) || value == Timeout.InfiniteTimeSpan)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (1)
5782if (totalMilliseconds < -1 || totalMilliseconds > Timer.MaxSupportedTimeout)
src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (2)
500ArgumentOutOfRangeException.ThrowIfGreaterThan(tm, Timer.MaxSupportedTimeout, parameter); 749public TimerDebuggerTypeProxy(Timer timer) => _timer = timer._timer._timer;
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
838[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Timer))]
System.Runtime.Caching (9)
System\Runtime\Caching\CacheExpires.cs (4)
769private GCHandleRef<Timer> _timerHandleRef; 846Timer timer; 866_timerHandleRef = new GCHandleRef<Timer>(timer); 873GCHandleRef<Timer> timerHandleRef = _timerHandleRef;
System\Runtime\Caching\MemoryCacheStatistics.cs (5)
33private GCHandleRef<Timer> _timerHandleRef; 62Timer timer = _timerHandleRef.Target; 171Timer timer; 191_timerHandleRef = new GCHandleRef<Timer>(timer); 341GCHandleRef<Timer> timerHandleRef = _timerHandleRef;
System.ServiceModel.NetFramingBase (2)
System\ServiceModel\Channels\BufferedConnection.cs (1)
16private Timer _flushTimer;
System\ServiceModel\Channels\IdlingCommunicationPool.cs (1)
89private Timer _idleTimer;
System.ServiceModel.UnixDomainSocket (3)
System\ServiceModel\Channels\SocketConnection.cs (3)
40private Timer _receiveTimer; 44private Timer _sendTimer; 719private Timer CreateTimer(TimerCallback callback)
System.Threading.RateLimiting (4)
System\Threading\RateLimiting\FixedWindowRateLimiter.cs (1)
25private readonly Timer? _renewTimer;
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (1)
27private readonly Timer? _renewTimer;
System\Threading\RateLimiting\TimerAwaitable.cs (1)
15private Timer? _timer;
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (1)
26private readonly Timer? _renewTimer;
System.Threading.Tasks.Dataflow (1)
Base\DataflowBlock.cs (1)
1133internal Timer? _timer;
System.Threading.Timer (1)
System.Threading.Timer.cs (1)
4[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Timer))]
System.Transactions.Local (2)
System\Transactions\TransactionScope.cs (1)
1202private Timer? _scopeTimer;
System\Transactions\TransactionTable.cs (1)
126private readonly Timer _timer;