729 references to FromSeconds
aspire (3)
Backchannel\ExtensionBackchannel.cs (1)
108if (waitingFor > TimeSpan.FromSeconds(10))
DotNet\DotNetCliRunner.cs (1)
622if (waitingFor > TimeSpan.FromSeconds(10))
NuGet\NuGetPackagePrefetcher.cs (1)
77using var timeout = new CancellationTokenSource(TimeSpan.FromSeconds(1));
Aspire.Azure.AI.OpenAI.Tests (1)
AspireAzureAIOpenAIExtensionsTests.cs (1)
159var networkTimeout = TimeSpan.FromSeconds(123);
Aspire.Cli.Tests (18)
CliTestConstants.cs (2)
8public static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(10); 9public static readonly TimeSpan LongTimeout = TimeSpan.FromSeconds(10);
Hosting\CliOrphanDetectorTests.cs (15)
28await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 47await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 70await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 91await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 121await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 125fakeTimeProvider.Advance(TimeSpan.FromSeconds(1)); 129fakeTimeProvider.Advance(TimeSpan.FromSeconds(1)); 163await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 189await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 192fakeTimeProvider.Advance(TimeSpan.FromSeconds(1)); 195fakeTimeProvider.Advance(TimeSpan.FromSeconds(1)); 198fakeTimeProvider.Advance(TimeSpan.FromSeconds(1)); 201fakeTimeProvider.Advance(TimeSpan.FromSeconds(1)); 231await resourcesCreatedTcs.Task.WaitAsync(TimeSpan.FromSeconds(60)); 234await pendingRun.WaitAsync(TimeSpan.FromSeconds(60));
TestServices\TestAppHostBackchannel.cs (1)
77using var timer = new PeriodicTimer(TimeSpan.FromSeconds(1));
Aspire.Dashboard (15)
Components\Controls\Chart\ChartBase.cs (4)
106else if (_lastUpdateTime.Add(TimeSpan.FromSeconds(0.2)) < TimeProvider.GetUtcNow()) 223start = start.Subtract(TimeSpan.FromSeconds(1)); 224end = end.Add(TimeSpan.FromSeconds(1)); 521return TimeProvider.GetUtcNow().Subtract(TimeSpan.FromSeconds(1)); // Compensate for delay in receiving metrics from services.
Components\Controls\Chart\ChartContainer.razor.cs (2)
70_tickTimer = new PeriodicTimer(TimeSpan.FromSeconds(0.2)); 189var startDate = endDate.Subtract(Duration + TimeSpan.FromSeconds(30));
Components\Controls\Chart\MetricTable.razor.cs (1)
45if (inProgressDataTime - _lastUpdate < TimeSpan.FromSeconds(1))
Components\Pages\ConsoleLogs.razor.cs (1)
198await loadingTcs.Task.WaitAsync(TimeSpan.FromSeconds(5), _resourceSubscriptionToken);
Model\DashboardCommandExecutor.cs (1)
78await Task.Delay(TimeSpan.FromSeconds(1)).ConfigureAwait(false);
Model\TraceLinkHelpers.cs (1)
80await Task.Delay(TimeSpan.FromSeconds(0.5), cts.Token).ConfigureAwait(false);
ServiceClient\DashboardClient.cs (5)
122KeepAlivePingDelay = TimeSpan.FromSeconds(20), 123KeepAlivePingTimeout = TimeSpan.FromSeconds(10), 155InitialBackoff = TimeSpan.FromSeconds(1), 156MaxBackoff = TimeSpan.FromSeconds(5), 342return TimeSpan.FromSeconds(Math.Min(Math.Pow(2, errorCount - 1), maxSeconds));
Aspire.Dashboard.Components.Tests (5)
Controls\PlotlyChartTests.cs (1)
85builder.Add(p => p.Duration, TimeSpan.FromSeconds(1));
Layout\MainLayoutTests.cs (3)
75await messageShownTcs.Task.WaitAsync(TimeSpan.FromSeconds(5)); 81Assert.True(await dismissedSettingSetTcs.Task.WaitAsync(TimeSpan.FromSeconds(5))); 120var completedTask = await Task.WhenAny(messageShownTcs.Task, timeoutTask).WaitAsync(TimeSpan.FromSeconds(5));
Shared\DashboardPageTestContext.cs (1)
12DefaultWaitTimeout = TimeSpan.FromSeconds(10);
Aspire.Dashboard.Tests (3)
Integration\IntegrationTestHelpers.cs (2)
168InitialBackoff = TimeSpan.FromSeconds(1), 169MaxBackoff = TimeSpan.FromSeconds(5),
tests\Shared\TestCertificateLoader.cs (1)
12private static readonly TimeSpan s_mutexTimeout = TimeSpan.FromSeconds(120);
Aspire.EndToEnd.Tests (9)
tests\Shared\TemplatesTesting\AspireProject.cs (8)
275var startupTimeoutTask = Task.Delay(TimeSpan.FromSeconds(AppStartupWaitTimeoutSecs), token); 298var allOutputCompleteTimeoutTask = Task.Delay(TimeSpan.FromSeconds(5), token); 366cts.CancelAfter(TimeSpan.FromSeconds(DashboardAvailabilityTimeoutSecs)); 384Delay = TimeSpan.FromSeconds(1) 474.WithTimeout(TimeSpan.FromSeconds(30)); 487.WithTimeout(TimeSpan.FromSeconds(30)); 515handler.PooledConnectionLifetime = TimeSpan.FromSeconds(5); 516handler.ConnectTimeout = TimeSpan.FromSeconds(5);
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
164var completedTask = await Task.WhenAny(waitForExitTask, Task.Delay(TimeSpan.FromSeconds(5), token)).ConfigureAwait(false);
Aspire.Hosting (19)
Cli\CliOrphanDetector.cs (1)
66using var periodic = new PeriodicTimer(TimeSpan.FromSeconds(1), timeProvider);
Dashboard\DashboardServiceHost.cs (1)
193if (elapsed > TimeSpan.FromSeconds(2))
Dcp\DcpDependencyCheck.cs (1)
77processResult = await task.WaitAsync(TimeSpan.FromSeconds(_dcpOptions.DependencyCheckTimeout), cancellationToken).ConfigureAwait(false);
Dcp\DcpExecutor.cs (1)
53private static readonly TimeSpan s_disposeTimeout = TimeSpan.FromSeconds(10);
Dcp\DcpHost.cs (2)
101await Task.Delay(TimeSpan.FromSeconds(2), timeoutCancellation.Token).ConfigureAwait(false); 437using var timer = new PeriodicTimer(TimeSpan.FromSeconds(5), _timeProvider);
Dcp\DcpOptions.cs (1)
83public TimeSpan ServiceStartupWatchTimeout { get; set; } = TimeSpan.FromSeconds(10);
Dcp\DcpPipelineBuilder.cs (3)
21MaxDelay = TimeSpan.FromSeconds(3), 44MaxDelay = TimeSpan.FromSeconds(1), 72MaxDelay = TimeSpan.FromSeconds(30),
Dcp\KubernetesService.cs (3)
92public TimeSpan MaxRetryDuration { get; set; } = TimeSpan.FromSeconds(20); 418MaxDelay = TimeSpan.FromSeconds(1), 514MaxDelay = TimeSpan.FromSeconds(5),
Dcp\Process\ProcessUtil.cs (1)
18private static readonly TimeSpan s_processExitTimeout = TimeSpan.FromSeconds(5);
DistributedApplication.cs (2)
205TimeSpan timeout = TimeSpan.FromSeconds(30); 209timeout = TimeSpan.FromSeconds(timeoutSeconds);
Health\ResourceHealthCheckService.cs (3)
19internal TimeSpan HealthyHealthCheckInterval { get; set; } = TimeSpan.FromSeconds(30); 20internal TimeSpan NonHealthyHealthCheckStepInterval { get; set; } = TimeSpan.FromSeconds(1); 136if (lastDelayInterrupted && TimeSpan.FromSeconds(1) - timeProvider.GetElapsedTime(lastHealthCheckTimestamp) is { Ticks: > 0 } delay)
Aspire.Hosting.Azure (2)
Provisioning\Internal\DefaultTokenCredentialProvider.cs (1)
35CredentialProcessTimeout = TimeSpan.FromSeconds(15)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
18private static readonly TimeSpan s_processExitTimeout = TimeSpan.FromSeconds(5);
Aspire.Hosting.Azure.Tests (13)
AzureCosmosDBEmulatorFunctionalTests.cs (2)
73Delay = TimeSpan.FromSeconds(10), 144Delay = TimeSpan.FromSeconds(10),
AzureDeployerTests.cs (1)
112await runTask.WaitAsync(TimeSpan.FromSeconds(10));
AzureEventHubsExtensionsTests.cs (1)
103await foreach (var partitionEvent in consumerClient.ReadEventsAsync(new ReadEventOptions { MaximumWaitTime = TimeSpan.FromSeconds(5) }))
AzureServiceBusExtensionsTests.cs (8)
26.WithProperties(queue => queue.DefaultMessageTimeToLive = TimeSpan.FromSeconds(1)); 30topic.DefaultMessageTimeToLive = TimeSpan.FromSeconds(1); 211queue.DuplicateDetectionHistoryTimeWindow = TimeSpan.FromSeconds(20); 223topic.DuplicateDetectionHistoryTimeWindow = TimeSpan.FromSeconds(20); 271Assert.Equal(TimeSpan.FromSeconds(20), queue.DuplicateDetectionHistoryTimeWindow.Value); 281Assert.Equal(TimeSpan.FromSeconds(20), topic.DuplicateDetectionHistoryTimeWindow.Value); 319queue.DuplicateDetectionHistoryTimeWindow = TimeSpan.FromSeconds(20); 331topic.DuplicateDetectionHistoryTimeWindow = TimeSpan.FromSeconds(20);
AzureSignalREmulatorFunctionalTest.cs (1)
83Delay = TimeSpan.FromSeconds(10),
Aspire.Hosting.Containers.Tests (1)
DockerSocketBindMountTests.cs (1)
38using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
Aspire.Hosting.Docker.Tests (1)
DockerComposePublisherTests.cs (1)
156await app.RunAsync().WaitAsync(TimeSpan.FromSeconds(60));
Aspire.Hosting.Garnet (1)
GarnetBuilderExtensions.cs (1)
156var interval = (persistenceAnnotation.Interval ?? TimeSpan.FromSeconds(60)).TotalMilliseconds.ToString(CultureInfo.InvariantCulture);
Aspire.Hosting.Garnet.Tests (4)
AddGarnetTests.cs (2)
307.WithPersistence(TimeSpan.FromSeconds(10)); 324.WithPersistence(TimeSpan.FromSeconds(60));
GarnetFunctionalTests.cs (2)
61.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(3) }) 105.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(10) })
Aspire.Hosting.Kafka.Tests (3)
KafkaFunctionalTests.cs (3)
88.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<ProduceException<string, string>>() }) 175.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<ProduceException<string, string>>() }) 228.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<ConsumeException>() })
Aspire.Hosting.MongoDB.Tests (4)
MongoDbFunctionalTests.cs (4)
72.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1) }) 110.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1) }) 256.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 354.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
Aspire.Hosting.MySql.Tests (7)
MySqlFunctionalTests.cs (7)
70.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2), ShouldHandle = new PredicateBuilder().Handle<MySqlException>() }) 124.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 303.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2), ShouldHandle = new PredicateBuilder().Handle<MySqlException>() }) 390.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2), ShouldHandle = new PredicateBuilder().Handle<MySqlException>() }) 474.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<MySqlException>() }) 618.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 692.AddRetry(new() { MaxRetryAttempts = 3, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
Aspire.Hosting.OpenAI (2)
OpenAIExtensions.cs (1)
49timeout: TimeSpan.FromSeconds(5),
StatusPageHealthCheck.cs (1)
36_timeout = timeout ?? TimeSpan.FromSeconds(5);
Aspire.Hosting.Oracle.Tests (3)
OracleFunctionalTests.cs (3)
87Delay = TimeSpan.FromSeconds(2) 259Delay = TimeSpan.FromSeconds(2) 357Delay = TimeSpan.FromSeconds(2)
Aspire.Hosting.PostgreSQL.Tests (5)
PostgresFunctionalTests.cs (5)
101.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<NpgsqlException>() }) 197.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<NpgsqlException>() }) 364.AddRetry(new() { MaxRetryAttempts = 3, Delay = TimeSpan.FromSeconds(2) }) 452.AddRetry(new() { MaxRetryAttempts = 3, Delay = TimeSpan.FromSeconds(2) }) 685.AddRetry(new() { MaxRetryAttempts = 3, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
Aspire.Hosting.Python.Tests (1)
AddPythonAppTests.cs (1)
103await app.ResourceNotifications.WaitForResourceAsync("pyproj", "Finished").WaitAsync(TimeSpan.FromSeconds(30));
Aspire.Hosting.Qdrant.Tests (2)
QdrantFunctionalTests.cs (2)
29.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<RpcException>() }) 93.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<RpcException>() })
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
116var interval = (persistenceAnnotation.Interval ?? TimeSpan.FromSeconds(60)).TotalSeconds.ToString(CultureInfo.InvariantCulture);
Aspire.Hosting.Redis.Tests (4)
AddRedisTests.cs (2)
655.WithPersistence(TimeSpan.FromSeconds(10), 2); 676.WithPersistence(TimeSpan.FromSeconds(60));
RedisFunctionalTests.cs (2)
182var cts2 = new CancellationTokenSource(TimeSpan.FromSeconds(2)); 550.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
Aspire.Hosting.SqlServer.Tests (5)
SqlServerFunctionalTests.cs (5)
66.AddRetry(new() { MaxRetryAttempts = int.MaxValue, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 131.AddRetry(new() { MaxRetryAttempts = int.MaxValue, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 341.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 407.AddRetry(new() { MaxRetryAttempts = 3, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 460.AddRetry(new() { MaxRetryAttempts = 3, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
Aspire.Hosting.Testing.Tests (5)
ResourceLoggerForwarderServiceTests.cs (2)
91await subscribedTcs.Task.WaitAsync(TimeSpan.FromSeconds(15)); 105await expectedLogCountTcs.Task.WaitAsync(TimeSpan.FromSeconds(15));
TestingBuilderTests.cs (2)
497await app.StartAsync().WaitAsync(TimeSpan.FromSeconds(10)); 534await app.StartAsync().WaitAsync(TimeSpan.FromSeconds(10));
TestingFactoryTests.cs (1)
79await _app.ResourceNotifications.WaitForResourceAsync("mywebapp1").WaitAsync(TimeSpan.FromSeconds(60));
Aspire.Hosting.Tests (46)
Backchannel\AppHostBackchannelTests.cs (10)
37await app.StartAsync().WaitAsync(TimeSpan.FromSeconds(60)); 39var backchannelReadyEvent = await backchannelReadyTaskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(60)); 43await socket.ConnectAsync(endpoint).WaitAsync(TimeSpan.FromSeconds(60)); 45_ = await backchannelConnectedTaskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(60)); 50await app.StopAsync().WaitAsync(TimeSpan.FromSeconds(60)); 75await app.StartAsync().WaitAsync(TimeSpan.FromSeconds(60)); 77var backchannelReadyEvent = await backchannelReadyTaskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(60)); 81await socket.ConnectAsync(endpoint).WaitAsync(TimeSpan.FromSeconds(60)); 89).WaitAsync(TimeSpan.FromSeconds(60)); 100await app.StopAsync().WaitAsync(TimeSpan.FromSeconds(60));
Backchannel\Exec\ContainerResourceExecTests.cs (2)
38await app.StopAsync().WaitAsync(TimeSpan.FromSeconds(60)); 62await app.StopAsync().WaitAsync(TimeSpan.FromSeconds(60));
Backchannel\Exec\ExecTestsBase.cs (1)
26var cts = new CancellationTokenSource(TimeSpan.FromSeconds(timeoutSec));
Backchannel\Exec\ProjectResourceExecTests.cs (5)
32await app.StopAsync().WaitAsync(TimeSpan.FromSeconds(60)); 55await app.StopAsync().WaitAsync(TimeSpan.FromSeconds(60)); 76await app.StopAsync().WaitAsync(TimeSpan.FromSeconds(60)); 100await app.StopAsync().WaitAsync(TimeSpan.FromSeconds(60)); 123await app.StopAsync().WaitAsync(TimeSpan.FromSeconds(60));
Codespaces\CodespacesUrlRewriterTests.cs (2)
28var abortToken = new CancellationTokenSource(TimeSpan.FromSeconds(60)); 64var abortToken = new CancellationTokenSource(TimeSpan.FromSeconds(60));
Dcp\DcpHostNotificationTests.cs (5)
79using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5)); 238using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5)); 289using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5)); 308timeProvider.Advance(TimeSpan.FromSeconds(5)); 352using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5));
DistributedApplicationTests.cs (1)
1068ConnectTimeout = TimeSpan.FromSeconds(2)
Eventing\DistributedApplicationBuilderEventingTests.cs (2)
219var fired = countdownEvent.Wait(TimeSpan.FromSeconds(10)); 262TimeSpan.FromSeconds(10)
Health\ResourceHealthCheckServiceTests.cs (4)
319timeProvider.Advance(TimeSpan.FromSeconds(5)); 322timeProvider.Advance(TimeSpan.FromSeconds(5)); 329Assert.Equal(TimeSpan.FromSeconds(10), duration); 483rhcs.HealthyHealthCheckInterval = TimeSpan.FromSeconds(1);
Orchestrator\ParameterProcessorTests.cs (4)
91await watchTask.WaitAsync(TimeSpan.FromSeconds(5)); 320var logs = await logsTask.WaitAsync(TimeSpan.FromSeconds(5)); 344var logs = await logsTask.WaitAsync(TimeSpan.FromSeconds(5)); 387var logs = await logsTask.WaitAsync(TimeSpan.FromSeconds(5));
Utils\DockerUtils.cs (2)
21var exited = process.WaitForExit(TimeSpan.FromSeconds(3)); 37var exited = process.WaitForExit(TimeSpan.FromSeconds(3));
Utils\PeriodicRestartAsyncEnumerableTests.cs (5)
15cts.CancelAfter(TimeSpan.FromSeconds(1)); 22await foreach (var _ in PeriodicRestartAsyncEnumerable.CreateAsync(innerFactory, restartInterval: TimeSpan.FromSeconds(2), cancellationToken: cts.Token).ConfigureAwait(false)) 24if (DateTime.UtcNow - start > TimeSpan.FromSeconds(2)) 39cts.CancelAfter(TimeSpan.FromSeconds(1)); 47if (DateTime.UtcNow - start > TimeSpan.FromSeconds(2))
WaitForTests.cs (3)
246).WaitAsync(TimeSpan.FromSeconds(15)); 270).WaitAsync(TimeSpan.FromSeconds(15)); 299.WaitAsync(TimeSpan.FromSeconds(15));
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
168var interval = (persistenceAnnotation.Interval ?? TimeSpan.FromSeconds(60)).TotalSeconds.ToString(CultureInfo.InvariantCulture);
Aspire.Hosting.Valkey.Tests (2)
AddValkeyTests.cs (2)
297.WithPersistence(TimeSpan.FromSeconds(10), 2); 314.WithPersistence(TimeSpan.FromSeconds(60));
Aspire.Hosting.Yarp.Tests (4)
YarpConfigGeneratorTests.cs (4)
27Timeout = TimeSpan.FromSeconds(1), 144Interval = TimeSpan.FromSeconds(4), 145Timeout = TimeSpan.FromSeconds(6), 188ActivityTimeout = TimeSpan.FromSeconds(60),
Aspire.NATS.Net.Tests (1)
AspireNatsClientExtensionsTests.cs (1)
227var activityList = await notifier.TakeAsync(1, TimeSpan.FromSeconds(10));
Aspire.Playground.Tests (4)
AppHostTests.cs (2)
124resilience.TotalRequestTimeout.Timeout = TimeSpan.FromSeconds(120); 125resilience.AttemptTimeout.Timeout = TimeSpan.FromSeconds(60);
Infrastructure\DistributedApplicationExtensions.cs (1)
246applyMigrationsHttpClient.Timeout = TimeSpan.FromSeconds(240);
ProjectSpecificTests.cs (1)
160cts.CancelAfter(TimeSpan.FromSeconds(timeoutSecs));
Aspire.Pomelo.EntityFrameworkCore.MySql (2)
AspireEFMySqlExtensions.cs (2)
87Delay = TimeSpan.FromSeconds(1), 88MaxDelay = TimeSpan.FromSeconds(30),
Aspire.RabbitMQ.Client (1)
AspireRabbitMQExtensions.cs (1)
188Delay = TimeSpan.FromSeconds(1),
Aspire.RabbitMQ.Client.Tests (1)
AspireRabbitMQExtensionsTests.cs (1)
157Assert.Equal(TimeSpan.FromSeconds(3), connectionFactory.SocketReadTimeout);
Aspire.RabbitMQ.Client.v7.Tests (1)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQExtensionsTests.cs (1)
157Assert.Equal(TimeSpan.FromSeconds(3), connectionFactory.SocketReadTimeout);
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisInstrumentationOptions.cs (1)
18public TimeSpan FlushInterval { get; set; } = TimeSpan.FromSeconds(10);
Aspire.StackExchange.Redis.DistributedCaching.Tests (1)
DistributedCacheConformanceTests.cs (1)
67var activityList = await notifier.TakeAsync(3, TimeSpan.FromSeconds(10));
Aspire.StackExchange.Redis.OutputCaching.Tests (1)
OutputCacheConformanceTests.cs (1)
67var activityList = await notifier.TakeAsync(3, TimeSpan.FromSeconds(10));
Aspire.StackExchange.Redis.Tests (1)
AspireRedisExtensionsTests.cs (1)
291var activityList = await notifier.TakeAsync(1, TimeSpan.FromSeconds(10));
Aspire.Templates.Tests (12)
TemplateTestsBase.cs (3)
187cts.CancelAfter(TimeSpan.FromSeconds(timeoutSecs)); 326.WithTimeout(TimeSpan.FromSeconds(testRunTimeoutSecs)); 333.WithTimeout(TimeSpan.FromSeconds(testRunTimeoutSecs));
tests\Shared\TemplatesTesting\AspireProject.cs (8)
275var startupTimeoutTask = Task.Delay(TimeSpan.FromSeconds(AppStartupWaitTimeoutSecs), token); 298var allOutputCompleteTimeoutTask = Task.Delay(TimeSpan.FromSeconds(5), token); 366cts.CancelAfter(TimeSpan.FromSeconds(DashboardAvailabilityTimeoutSecs)); 384Delay = TimeSpan.FromSeconds(1) 474.WithTimeout(TimeSpan.FromSeconds(30)); 487.WithTimeout(TimeSpan.FromSeconds(30)); 515handler.PooledConnectionLifetime = TimeSpan.FromSeconds(5); 516handler.ConnectTimeout = TimeSpan.FromSeconds(5);
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
164var completedTask = await Task.WhenAny(waitForExitTask, Task.Delay(TimeSpan.FromSeconds(5), token)).ConfigureAwait(false);
AzureAppConfiguration.Web (1)
Program.cs (1)
11refresh.SetRefreshInterval(TimeSpan.FromSeconds(10));
AzureSearch.ApiService (1)
Program.cs (1)
172await Task.Delay(TimeSpan.FromSeconds(2), cancellationToken);
Consumer (1)
ConsumerWorker.cs (1)
21result = consumer.Consume(TimeSpan.FromSeconds(1));
CosmosEndToEnd.ApiService (1)
Program.cs (1)
17configureDbContextOptions.RequestTimeout = TimeSpan.FromSeconds(120);
CustomResources.AppHost (1)
TestResource.cs (1)
54using var timer = new PeriodicTimer(TimeSpan.FromSeconds(seconds));
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\DnsCache.cs (1)
24private static readonly TimeSpan s_cacheTimeout = TimeSpan.FromSeconds(2);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\LifetimeManager.cs (1)
189CloseCore(TimeSpan.FromSeconds(1), true);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ChannelHandler.cs (1)
20public static readonly TimeSpan CloseAfterFaultTimeout = TimeSpan.FromSeconds(10);
HealthChecksSandbox.AppHost (1)
Program.cs (1)
72await Task.Delay(TimeSpan.FromSeconds(10));
InMemory.FunctionalTests (81)
Http2\Http2KeepAliveTests.cs (30)
36TriggerTick(TimeSpan.FromSeconds(1.1 * 2)); 44TriggerTick(TimeSpan.FromSeconds(1.1)); 45TriggerTick(TimeSpan.FromSeconds(1.1)); 46TriggerTick(TimeSpan.FromSeconds(1.1 * 20)); 65TriggerTick(TimeSpan.FromSeconds(1.1 * 2)); 93TriggerTick(TimeSpan.FromSeconds(1.1)); 108TriggerTick(TimeSpan.FromSeconds(1.1)); 109TriggerTick(TimeSpan.FromSeconds(1.1)); 110TriggerTick(TimeSpan.FromSeconds(1.1)); 124TriggerTick(TimeSpan.FromSeconds(1.1 * 2)); 131TriggerTick(TimeSpan.FromSeconds(1.1)); 132TriggerTick(TimeSpan.FromSeconds(1.1)); 133TriggerTick(TimeSpan.FromSeconds(1.1)); 148TriggerTick(TimeSpan.FromSeconds(1.1 * 2)); 156TriggerTick(TimeSpan.FromSeconds(1.1)); 157TriggerTick(TimeSpan.FromSeconds(1.1)); 165TriggerTick(TimeSpan.FromSeconds(1.1)); 166TriggerTick(TimeSpan.FromSeconds(1.1)); 189TriggerTick(TimeSpan.FromSeconds(1.1 * 2)); 197TriggerTick(TimeSpan.FromSeconds(1.1)); 198TriggerTick(TimeSpan.FromSeconds(1.1)); 199TriggerTick(TimeSpan.FromSeconds(1.1)); 200TriggerTick(TimeSpan.FromSeconds(1.1)); 221TriggerTick(TimeSpan.FromSeconds(1.1 * 2)); 259TriggerTick(TimeSpan.FromSeconds(1.1)); 294TriggerTick(TimeSpan.FromSeconds(1.1)); 304TriggerTick(TimeSpan.FromSeconds(1.1)); 348TriggerTick(TimeSpan.FromSeconds(1.1)); 351TriggerTick(TimeSpan.FromSeconds(1.1)); 362TriggerTick(TimeSpan.FromSeconds(1.1));
Http2\Http2TimeoutTests.cs (29)
218AdvanceTime(TimeSpan.FromSeconds(_bytesReceived / limits.MinResponseDataRate.BytesPerSecond) + 219limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5)); 353limits.MinResponseDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 375AdvanceTime(TimeSpan.FromSeconds((_bytesReceived + _helloWorldBytes.Length) / limits.MinResponseDataRate.BytesPerSecond) + 376limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5)); 406limits.MinResponseDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 427var timeToWriteMaxData = TimeSpan.FromSeconds((_bytesReceived + _maxData.Length) / limits.MinResponseDataRate.BytesPerSecond) + 428limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5); 461limits.MinResponseDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 484AdvanceTime(TimeSpan.FromSeconds(_bytesReceived / limits.MinResponseDataRate.BytesPerSecond) + 485limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5)); 513limits.MinResponseDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 535var timeToWriteMaxData = TimeSpan.FromSeconds(_bytesReceived / limits.MinResponseDataRate.BytesPerSecond) + 536limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5); 567limits.MinResponseDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 601var timeToWriteMaxData = TimeSpan.FromSeconds(_bytesReceived / limits.MinResponseDataRate.BytesPerSecond) + 602limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5); 633limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 680limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 700var timeToReadMaxData = TimeSpan.FromSeconds(_maxData.Length / limits.MinRequestBodyDataRate.BytesPerSecond) - TimeSpan.FromSeconds(.5); 731limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 761var timeToReadMaxData = TimeSpan.FromSeconds(_maxData.Length / limits.MinRequestBodyDataRate.BytesPerSecond); 767timeToReadMaxData -= TimeSpan.FromSeconds(.5); 798limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 835var timeToReadMaxData = TimeSpan.FromSeconds(_maxData.Length / limits.MinRequestBodyDataRate.BytesPerSecond) - TimeSpan.FromSeconds(.5); 866limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 923limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
Http2\Http2WebSocketTests.cs (1)
328limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
Http3\Http3TimeoutTests.cs (18)
341limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 383limits.MinResponseDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 451limits.MinResponseDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 470Http3Api.AdvanceTime(TimeSpan.FromSeconds((requestStream.BytesReceived + _helloWorldBytes.Length) / limits.MinResponseDataRate.BytesPerSecond) + 471limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5)); 493limits.MinResponseDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 511var timeToWriteMaxData = TimeSpan.FromSeconds((requestStream.BytesReceived + _maxData.Length) / limits.MinResponseDataRate.BytesPerSecond) + 512limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5); 535limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 554var timeToReadMaxData = TimeSpan.FromSeconds(_maxData.Length / limits.MinRequestBodyDataRate.BytesPerSecond) - TimeSpan.FromSeconds(.5); 581limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 603var timeToReadMaxData = TimeSpan.FromSeconds(_maxData.Length / limits.MinRequestBodyDataRate.BytesPerSecond); 609timeToReadMaxData -= TimeSpan.FromSeconds(.5); 636limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5)); 665var timeToReadMaxData = TimeSpan.FromSeconds(_maxData.Length / limits.MinRequestBodyDataRate.BytesPerSecond) - TimeSpan.FromSeconds(.5); 692limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
KeepAliveTimeoutTests.cs (1)
20private static readonly TimeSpan _shortDelay = TimeSpan.FromSeconds(_longDelay.TotalSeconds / 10);
RequestHeadersTimeoutTests.cs (1)
18private static readonly TimeSpan ShortDelay = TimeSpan.FromSeconds(LongDelay.TotalSeconds / 10);
ResponseDrainingTests.cs (1)
65testContext.FakeTimeProvider.Advance(Heartbeat.Interval - TimeSpan.FromSeconds(.5));
Microsoft.Arcade.Common (1)
ExponentialRetry.cs (1)
56TimeSpan delay = TimeSpan.FromSeconds(
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Latency\RequestLatencyTelemetryOptions.cs (1)
21public TimeSpan LatencyDataExportTimeout { get; set; } = TimeSpan.FromSeconds(5);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (12)
Latency\RequestLatencyTelemetryExtensionsTests.cs (1)
54LatencyDataExportTimeout = TimeSpan.FromSeconds(2)
Latency\RequestLatencyTelemetryMiddlewareTests.cs (2)
163var exportTimeout = TimeSpan.FromSeconds(1); 164var ex1 = new TimeConsumingExporter(TimeSpan.FromSeconds(5));
Latency\RequestLatencyTelemetryOptionsValidatorTests.cs (2)
15var options = new RequestLatencyTelemetryOptions { LatencyDataExportTimeout = TimeSpan.FromSeconds(0) }; 24var options = new RequestLatencyTelemetryOptions { LatencyDataExportTimeout = TimeSpan.FromSeconds(1) };
Logging\AcceptanceTests.cs (1)
45private static readonly TimeSpan _defaultLogTimeout = TimeSpan.FromSeconds(5);
Logging\AcceptanceTests.Mvc.cs (5)
68await WaitForLogRecordsAsync(logCollector, TimeSpan.FromSeconds(30)); 103await WaitForLogRecordsAsync(logCollector, TimeSpan.FromSeconds(30)); 149await WaitForLogRecordsAsync(logCollector, TimeSpan.FromSeconds(30)); 193await WaitForLogRecordsAsync(logCollector, TimeSpan.FromSeconds(30)); 234await WaitForLogRecordsAsync(logCollector, TimeSpan.FromSeconds(30));
Logging\AcceptanceTests.Routing.cs (1)
68await WaitForLogRecordsAsync(logCollector, TimeSpan.FromSeconds(30));
Microsoft.AspNetCore.HeaderParsing.Tests (1)
ParserTests.cs (1)
122Assert.Equal(TimeSpan.FromSeconds(604800), result.MaxAge);
Microsoft.AspNetCore.Http.Tests (2)
Timeouts\RequestTimeoutsMiddlewareTests.cs (2)
284var ctsLinker = new MockCancellationTokenSourceProvider(expectedTimeSpan.HasValue ? TimeSpan.FromSeconds(expectedTimeSpan.Value) : null, cancelledCts); 289Timeout = TimeSpan.FromSeconds(defaultTimeout.Value),
Microsoft.AspNetCore.Identity.FunctionalTests (2)
MapIdentityApiTests.cs (2)
193clock.Advance(TimeSpan.FromSeconds(expireTimeSpan.TotalSeconds - 1)); 350clock.Advance(TimeSpan.FromSeconds(expireTimeSpan.TotalSeconds - 1));
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Infrastructure\TimeoutControl.cs (1)
290var ticksToCompleteWriteAtMinRate = TimeSpan.FromSeconds(count / minRate.BytesPerSecond).ToTicks(_timeProvider);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (9)
TimeoutControlTests.cs (9)
173_timeProvider.Advance(TimeSpan.FromSeconds(0.5)); 177_timeProvider.Advance(TimeSpan.FromSeconds(0.5)); 188_timeProvider.Advance(TimeSpan.FromSeconds(0.5)); 192_timeProvider.Advance(TimeSpan.FromSeconds(1.0)); 194_timeProvider.Advance(TimeSpan.FromSeconds(.5)); 230_timeProvider.Advance(TimeSpan.FromSeconds(0.25)); 234_timeProvider.Advance(TimeSpan.FromSeconds(0.25)); 238_timeProvider.Advance(TimeSpan.FromSeconds(0.5)); 465AdvanceClock(Heartbeat.Interval + minRate.GracePeriod + TimeSpan.FromSeconds((numWrites - 1) * writeSize / minRate.BytesPerSecond));
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
QuicConnectionContextTests.cs (1)
530timeProvider.Advance(TimeSpan.FromSeconds(0.1));
Microsoft.AspNetCore.Session.Tests (2)
SessionTests.cs (2)
752IOTimeout = TimeSpan.FromSeconds(0.5) 914IOTimeout = TimeSpan.FromSeconds(0.5)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Workspaces\WorkspaceTests_EditorFeatures.cs (4)
809var shortEventTimeout = TimeSpan.FromSeconds(5); 878var shortEventTimeout = TimeSpan.FromSeconds(5); 941var shortEventTimeout = TimeSpan.FromSeconds(5); 1002var shortEventTimeout = TimeSpan.FromSeconds(5);
Microsoft.CodeAnalysis.EditorFeatures (2)
EditorConfigSettings\Aggregator\SettingsAggregator.cs (1)
46TimeSpan.FromSeconds(1),
LanguageServer\RazorInProcLanguageClient.cs (1)
84var regex = new Regex(regexExpression, RegexOptions.Compiled | RegexOptions.Singleline, TimeSpan.FromSeconds(1));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Utilities\AsynchronousOperationListenerTests.cs (3)
22private static readonly TimeSpan s_unexpectedDelay = TimeSpan.FromSeconds(60); 89sleepHelper.Sleep(TimeSpan.FromSeconds(1)); 259sleepHelper.Sleep(TimeSpan.FromSeconds(10));
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Host\RemoteWorkspaceManager.cs (1)
53=> new SolutionAssetCache(workspace, cleanupInterval: TimeSpan.FromSeconds(30), purgeAfter: TimeSpan.FromMinutes(1));
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\TextLoader.cs (1)
25internal static readonly TimeSpan RetryDelay = TimeSpan.FromSeconds(MaxDelaySecs / MaxRetries);
Microsoft.DotNet.Build.Tasks.Installers (1)
src\ExecWithRetries.cs (1)
98TimeSpan delay = TimeSpan.FromSeconds(
Microsoft.Extensions.AI.Abstractions.Tests (30)
SpeechToText\SpeechToTextResponseTests.cs (10)
124TimeSpan startTime = TimeSpan.FromSeconds(1); 129TimeSpan endTime = TimeSpan.FromSeconds(2); 157StartTime = TimeSpan.FromSeconds(1), 158EndTime = TimeSpan.FromSeconds(2), 178Assert.Equal(TimeSpan.FromSeconds(1), result.StartTime); 179Assert.Equal(TimeSpan.FromSeconds(2), result.EndTime); 214StartTime = TimeSpan.FromSeconds(1), 215EndTime = TimeSpan.FromSeconds(2), 232Assert.Equal(TimeSpan.FromSeconds(1), update.StartTime); 233Assert.Equal(TimeSpan.FromSeconds(2), update.EndTime);
SpeechToText\SpeechToTextResponseUpdateExtensionsTests.cs (12)
49new("human, ") { ModelId = "model123", StartTime = TimeSpan.FromSeconds(10), EndTime = TimeSpan.FromSeconds(20) }, 50new("How ") { ModelId = "model123", StartTime = TimeSpan.FromSeconds(22), EndTime = TimeSpan.FromSeconds(23) }, 51new("are ") { ModelId = "model123", StartTime = TimeSpan.FromSeconds(23), EndTime = TimeSpan.FromSeconds(24) }, 52new([new TextContent("You?")]) { ModelId = "model123", StartTime = TimeSpan.FromSeconds(24), EndTime = TimeSpan.FromSeconds(25), AdditionalProperties = new() { ["c"] = "d" } }, 53new() { ResponseId = "someResponse", ModelId = "model123", StartTime = TimeSpan.FromSeconds(25), EndTime = TimeSpan.FromSeconds(35) }, 63Assert.Equal(TimeSpan.FromSeconds(10), response.StartTime); 64Assert.Equal(TimeSpan.FromSeconds(35), response.EndTime);
SpeechToText\SpeechToTextResponseUpdateTests.cs (6)
52update.StartTime = TimeSpan.FromSeconds(10); 53update.EndTime = TimeSpan.FromSeconds(20); 54Assert.Equal(TimeSpan.FromSeconds(10), update.StartTime); 55Assert.Equal(TimeSpan.FromSeconds(20), update.EndTime); 90StartTime = TimeSpan.FromSeconds(5), 91EndTime = TimeSpan.FromSeconds(10),
Utilities\AIJsonUtilitiesTests.cs (2)
1051string key3 = AIJsonUtilities.HashDataToString([TimeSpan.FromSeconds(1), null, 1.23], options); 1052string key4 = AIJsonUtilities.HashDataToString([TimeSpan.FromSeconds(1), null, 1.23], options);
Microsoft.Extensions.AI.Evaluation.Reporting (1)
JsonSerialization\TimeSpanConverter.cs (1)
13=> TimeSpan.FromSeconds(reader.GetDouble());
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
src\Libraries\Microsoft.Extensions.AI.Evaluation.Reporting\CSharp\JsonSerialization\TimeSpanConverter.cs (1)
13=> TimeSpan.FromSeconds(reader.GetDouble());
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (10)
ChatTurnDetailsTests.cs (6)
27Assert.Equal(TimeSpan.FromSeconds(5), details!.Latency); 61Assert.Equal(TimeSpan.FromSeconds(5), details!.Latency); 96Assert.Equal(TimeSpan.FromSeconds(5), details!.Latency); 132Assert.Equal(TimeSpan.FromSeconds(1), details!.Latency); 174Assert.Equal(TimeSpan.FromSeconds(1), details!.Latency); 217Assert.Equal(TimeSpan.FromSeconds(2), details!.Latency);
ScenarioRunResultTests.cs (4)
65latency: TimeSpan.FromSeconds(1), 74latency: TimeSpan.FromSeconds(2), 157latency: TimeSpan.FromSeconds(1), 166latency: TimeSpan.FromSeconds(2),
Microsoft.Extensions.Caching.Hybrid.Tests (1)
TestEventListener.cs (1)
182await Task.Delay(TimeSpan.FromSeconds(EventCounterIntervalSec * 2));
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (18)
TimeExpirationAsyncTests.cs (9)
69await Task.Delay(TimeSpan.FromSeconds(0.5)); 83await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 135await Task.Delay(TimeSpan.FromSeconds(0.5)); 148await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 195await Task.Delay(TimeSpan.FromSeconds(3.5)); 208await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(0.25))); 228await Task.Delay(TimeSpan.FromSeconds(0.5)); 256await Task.Delay(TimeSpan.FromSeconds(0.5)); 265await Task.Delay(TimeSpan.FromSeconds(0.5));
TimeExpirationTests.cs (9)
52Thread.Sleep(TimeSpan.FromSeconds(0.5)); 66cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 119Thread.Sleep(TimeSpan.FromSeconds(0.5)); 132cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 180Thread.Sleep(TimeSpan.FromSeconds(3.5)); 193cache.Set(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(0.25))); 213Thread.Sleep(TimeSpan.FromSeconds(0.5)); 241Thread.Sleep(TimeSpan.FromSeconds(0.5)); 250Thread.Sleep(TimeSpan.FromSeconds(0.5));
Microsoft.Extensions.Diagnostics.Probes (1)
TcpEndpointProbesOptions.cs (1)
46public TimeSpan HealthAssessmentPeriod { get; set; } = TimeSpan.FromSeconds(30);
Microsoft.Extensions.Diagnostics.Probes.Tests (4)
TcpEndpointProbesExtensionsTests.cs (4)
51o.HealthAssessmentPeriod = TimeSpan.FromSeconds(15); 60Assert.Equal(TimeSpan.FromSeconds(15), config.Value.HealthAssessmentPeriod); 88o.HealthAssessmentPeriod = TimeSpan.FromSeconds(5); 98Assert.Equal(TimeSpan.FromSeconds(5), config.Get("Liveness").HealthAssessmentPeriod);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (3)
ResourceMonitoringOptions.cs (3)
22internal static readonly TimeSpan DefaultCollectionWindow = TimeSpan.FromSeconds(5); 23internal static readonly TimeSpan DefaultSamplingInterval = TimeSpan.FromSeconds(1); 24internal static readonly TimeSpan DefaultRefreshInterval = TimeSpan.FromSeconds(5);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (64)
CalculatorTests.cs (6)
31TimeSpan secondSnapshotTimeSpan = _firstSnapshot.TotalTimeSinceStart.Add(TimeSpan.FromSeconds(5)); 66TimeSpan secondSnapshotTimeSpan = _firstSnapshot.TotalTimeSinceStart.Add(TimeSpan.FromSeconds(5)); 95totalTimeSinceStart: _firstSnapshot.TotalTimeSinceStart.Add(TimeSpan.FromSeconds(5)), 127totalTimeSinceStart: firstSnapshot.TotalTimeSinceStart.Add(TimeSpan.FromSeconds(5)), 144TimeSpan secondSnapshotTimeSpan = _firstSnapshot.TotalTimeSinceStart.Add(TimeSpan.FromSeconds(5)); 175TimeSpan secondSnapshotTimeSpan = _firstSnapshot.TotalTimeSinceStart.Add(TimeSpan.FromSeconds(5));
Linux\AcceptanceTest.cs (7)
257var utilization = tracker.GetUtilization(TimeSpan.FromSeconds(5)); 270clock.Advance(TimeSpan.FromSeconds(6)); 275utilization = tracker.GetUtilization(TimeSpan.FromSeconds(5)); 361var utilization = tracker.GetUtilization(TimeSpan.FromSeconds(5)); 375clock.Advance(TimeSpan.FromSeconds(6)); 380utilization = tracker.GetUtilization(TimeSpan.FromSeconds(5)); 464clock.Advance(TimeSpan.FromSeconds(6));
Linux\Disk\LinuxSystemDiskMetricsTests.cs (3)
256fakeTimeProvider.Advance(TimeSpan.FromMinutes(5).Add(TimeSpan.FromSeconds(1))); 265fakeTimeProvider.Advance(TimeSpan.FromMinutes(5).Add(TimeSpan.FromSeconds(1))); 273fakeTimeProvider.Advance(TimeSpan.FromMinutes(5).Add(TimeSpan.FromSeconds(1)));
Providers\ConditionallyFaultProvider.cs (2)
36TimeSpan.FromSeconds(1), 37TimeSpan.FromSeconds(1),
Providers\FakeProvider.cs (2)
13TimeSpan.FromSeconds(1), 14TimeSpan.FromSeconds(1),
ResourceMonitoringExtensionsTests.cs (10)
136options.CollectionWindow = TimeSpan.FromSeconds(SamplingWindowValue); 137options.PublishingWindow = TimeSpan.FromSeconds(CalculationPeriodValue); 145Assert.Equal(TimeSpan.FromSeconds(SamplingWindowValue), options!.Value.CollectionWindow); 146Assert.Equal(TimeSpan.FromSeconds(CalculationPeriodValue), options!.Value.PublishingWindow); 161= TimeSpan.FromSeconds(SamplingWindowValue).ToString(), 163= TimeSpan.FromSeconds(SamplingPeriodValue).ToString(), 165= TimeSpan.FromSeconds(CalculationPeriod).ToString() 186Assert.Equal(TimeSpan.FromSeconds(SamplingWindowValue), options!.Value.CollectionWindow); 187Assert.Equal(TimeSpan.FromSeconds(SamplingPeriodValue), options!.Value.SamplingInterval); 188Assert.Equal(TimeSpan.FromSeconds(CalculationPeriod), options!.Value.PublishingWindow);
ResourceMonitoringOptionsCustomValidatorTests.cs (4)
50CollectionWindow = TimeSpan.FromSeconds(collectionWindow), 51PublishingWindow = TimeSpan.FromSeconds(calculationPeriod) 64CollectionWindow = TimeSpan.FromSeconds(1), 65PublishingWindow = TimeSpan.FromSeconds(2)
ResourceMonitoringOptionsTests.cs (1)
18PublishingWindow = TimeSpan.FromSeconds(50)
ResourceMonitoringOptionsValidatorTests.cs (5)
19PublishingWindow = TimeSpan.FromSeconds(200) 35SamplingInterval = TimeSpan.FromSeconds(1), 36PublishingWindow = TimeSpan.FromSeconds(200) 51PublishingWindow = TimeSpan.FromSeconds(200) 66PublishingWindow = TimeSpan.FromSeconds(-5)
ResourceMonitoringServiceTests.cs (12)
170CollectionWindow = TimeSpan.FromSeconds(1), 171PublishingWindow = TimeSpan.FromSeconds(1) 644TimeSpan.FromSeconds(1), 645TimeSpan.FromSeconds(1), 653CollectionWindow = TimeSpan.FromSeconds(1), 655PublishingWindow = TimeSpan.FromSeconds(1) 663var exception = Record.Exception(() => _ = tracker.GetUtilization(TimeSpan.FromSeconds(1))); 678CollectionWindow = TimeSpan.FromSeconds(6), 679PublishingWindow = TimeSpan.FromSeconds(5) 687var exception = Record.Exception(() => tracker.GetUtilization(TimeSpan.FromSeconds(6))); 702CollectionWindow = TimeSpan.FromSeconds(5) 710var exception = Record.Exception(() => tracker.GetUtilization(TimeSpan.FromSeconds(6)));
SnapshotTests.cs (3)
18var snapshot = new Snapshot(TimeSpan.FromTicks(time.GetUtcNow().Ticks), TimeSpan.Zero, TimeSpan.FromSeconds(1), 10); 22snapshot = new Snapshot(time, TimeSpan.Zero, TimeSpan.FromSeconds(1), 10); 30=> new Snapshot(new FakeTimeProvider(), TimeSpan.MinValue, TimeSpan.FromSeconds(1), 1000));
Windows\Disk\WindowsDiskIoRatePerfCounterTests.cs (2)
25var fakeTimeProvider = new FakeTimeProvider { AutoAdvanceAmount = TimeSpan.FromSeconds(60) }; 72var fakeTimeProvider = new FakeTimeProvider { AutoAdvanceAmount = TimeSpan.FromSeconds(30) };
Windows\Disk\WindowsDiskIoTimePerfCounterTests.cs (1)
25var fakeTimeProvider = new FakeTimeProvider { AutoAdvanceAmount = TimeSpan.FromSeconds(60) };
Windows\Disk\WindowsDiskMetricsTests.cs (2)
102fakeTimeProvider.Advance(TimeSpan.FromSeconds(30)); 176fakeTimeProvider.Advance(TimeSpan.FromSeconds(30));
Windows\Tcp6TableInfoTests.cs (1)
21public static readonly TimeSpan DefaultTimeSpan = TimeSpan.FromSeconds(5);
Windows\TcpTableInfoTests.cs (1)
18public static readonly TimeSpan DefaultTimeSpan = TimeSpan.FromSeconds(5);
Windows\WindowsCountersTests.cs (2)
27SamplingInterval = TimeSpan.FromSeconds(5) 69SamplingInterval = TimeSpan.FromSeconds(5)
Microsoft.Extensions.Diagnostics.Testing.Tests (9)
Metrics\MetricCollectorTests.cs (9)
69timeProvider.Advance(TimeSpan.FromSeconds(1)); 114timeProvider.Advance(TimeSpan.FromSeconds(1)); 161timeProvider.Advance(TimeSpan.FromSeconds(1)); 222timeProvider.Advance(TimeSpan.FromSeconds(1)); 312var wait = collector.WaitForMeasurementsAsync(2, TimeSpan.FromSeconds(1)); 321wait = collector.WaitForMeasurementsAsync(1, TimeSpan.FromSeconds(1)); 327await wait.WaitAsync(TimeSpan.FromSeconds(5), TimeProvider.System); 356var wait = collector.WaitForMeasurementsAsync(2, TimeSpan.FromSeconds(1)); 367await Assert.ThrowsAsync<ObjectDisposedException>(async () => await collector.WaitForMeasurementsAsync(1, TimeSpan.FromSeconds(1)));
Microsoft.Extensions.Hosting.Testing (3)
FakeHostOptions.cs (3)
19public TimeSpan StartUpTimeout { get; set; } = TimeSpan.FromSeconds(5); 26public TimeSpan ShutDownTimeout { get; set; } = TimeSpan.FromSeconds(10); 36public TimeSpan TimeToLive { get; set; } = TimeSpan.FromSeconds(30);
Microsoft.Extensions.Http.Diagnostics (1)
Logging\LoggingOptions.cs (1)
72public TimeSpan BodyReadTimeout { get; set; } = TimeSpan.FromSeconds(1);
Microsoft.Extensions.Http.Diagnostics.Tests (22)
Logging\HttpClientLoggingExtensionsTest.cs (12)
86.AddExtendedHttpClientLogging(options => options.BodyReadTimeout = TimeSpan.FromSeconds(1)) 89.AddExtendedHttpClientLogging(options => options.BodyReadTimeout = TimeSpan.FromSeconds(2)) 98optionsFirst.BodyReadTimeout.Should().Be(TimeSpan.FromSeconds(1)); 99optionsSecond.BodyReadTimeout.Should().Be(TimeSpan.FromSeconds(2)); 109.AddExtendedHttpClientLogging(options => options.BodyReadTimeout = TimeSpan.FromSeconds(1)) 112.AddExtendedHttpClientLogging(options => options.BodyReadTimeout = TimeSpan.FromSeconds(2)) 121optionsFirst.BodyReadTimeout.Should().Be(TimeSpan.FromSeconds(1)); 122optionsSecond.BodyReadTimeout.Should().Be(TimeSpan.FromSeconds(2)); 152var bodyReadTimeout = TimeSpan.FromSeconds(1); 227var timeoutValue = TimeSpan.FromSeconds(seconds); 261var bodyReadTimeout = TimeSpan.FromSeconds(1); 377var timeoutValue = TimeSpan.FromSeconds(seconds);
Logging\HttpRequestBodyReaderTest.cs (1)
254var timeout = TimeSpan.FromSeconds(274);
Logging\HttpRequestReaderTest.cs (8)
65BodyReadTimeout = TimeSpan.FromSeconds(100000), 129BodyReadTimeout = TimeSpan.FromSeconds(10), 191BodyReadTimeout = TimeSpan.FromSeconds(10), 265BodyReadTimeout = TimeSpan.FromSeconds(10), 337BodyReadTimeout = TimeSpan.FromSeconds(10), 396BodyReadTimeout = TimeSpan.FromSeconds(10), 467BodyReadTimeout = TimeSpan.FromSeconds(10), 534BodyReadTimeout = TimeSpan.FromSeconds(10),
Logging\HttpResponseBodyReaderTest.cs (1)
272var timeout = TimeSpan.FromSeconds(274);
Microsoft.Extensions.Http.Resilience (2)
Hedging\HedgingEndpointOptions.cs (1)
57Timeout = TimeSpan.FromSeconds(10),
Resilience\HttpStandardResilienceOptions.cs (1)
95Timeout = TimeSpan.FromSeconds(10),
Microsoft.Extensions.Http.Resilience.Tests (35)
Hedging\HttpStandardHedgingResilienceOptionsCustomValidatorTests.cs (5)
19options.Endpoint.CircuitBreaker.SamplingDuration = TimeSpan.FromSeconds(1); 20options.TotalRequestTimeout.Timeout = TimeSpan.FromSeconds(1); 82options.TotalRequestTimeout.Timeout = TimeSpan.FromSeconds(2); 83options.Endpoint.Timeout.Timeout = TimeSpan.FromSeconds(3); 87options.TotalRequestTimeout.Timeout = TimeSpan.FromSeconds(2);
Hedging\HttpStandardHedgingResilienceOptionsTests.cs (2)
22_options.TotalRequestTimeout.Timeout.Should().Be(TimeSpan.FromSeconds(30)); 23_options.Endpoint.Timeout.Timeout.Should().Be(TimeSpan.FromSeconds(10));
Hedging\StandardHedgingTests.cs (5)
55Builder.Configure(options => options.TotalRequestTimeout.Timeout = TimeSpan.FromSeconds(1)); 328opt.Hedging.Delay = TimeSpan.FromSeconds(11); 330opt.Endpoint.CircuitBreaker.SamplingDuration = TimeSpan.FromSeconds(900); 331opt.TotalRequestTimeout.Timeout = TimeSpan.FromSeconds(200); 332opt.Endpoint.Timeout.Timeout = TimeSpan.FromSeconds(200);
Internal\RetryAfterHelperTests.cs (2)
20response.Headers.RetryAfter = new RetryConditionHeaderValue(TimeSpan.FromSeconds(10)); 25retryAfter.Should().Be(TimeSpan.FromSeconds(10));
Polly\HttpCircuitBreakerStrategyOptionsTests.cs (2)
40_testObject.BreakDuration.Should().Be(TimeSpan.FromSeconds(5)); 42_testObject.SamplingDuration.Should().Be(TimeSpan.FromSeconds(30));
Polly\HttpRetryStrategyOptionsTests.cs (3)
42options.Delay.Should().Be(TimeSpan.FromSeconds(2)); 134RetryAfter = new RetryConditionHeaderValue(TimeSpan.FromSeconds(10)) 143Assert.Equal(result, TimeSpan.FromSeconds(10));
Polly\HttpTimeoutStrategyOptionsTests.cs (1)
23_testObject.Timeout.Should().Be(TimeSpan.FromSeconds(30));
Resilience\HttpClientBuilderExtensionsTests.BySelector.cs (4)
33.AddResilienceHandler("dummy", builder => builder.AddTimeout(TimeSpan.FromSeconds(1))) 50var builder = _builder.AddResilienceHandler("dummy", builder => builder.AddTimeout(TimeSpan.FromSeconds(1))).SelectPipelineByAuthority(); 72.AddResilienceHandler("dummy", builder => builder.AddTimeout(TimeSpan.FromSeconds(1))) 119.AddResilienceHandler("dummy", builder => builder.AddTimeout(TimeSpan.FromSeconds(1)))
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (2)
74builder.AddTimeout(TimeSpan.FromSeconds(1)); 361private void ConfigureBuilder(ResiliencePipelineBuilder<HttpResponseMessage> builder) => builder.AddTimeout(TimeSpan.FromSeconds(1));
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (2)
188options.TotalRequestTimeout.Timeout = TimeSpan.FromSeconds(1); 189options.AttemptTimeout.Timeout = TimeSpan.FromSeconds(2);
Resilience\HttpStandardResilienceOptionsCustomValidatorTests.cs (5)
25options.CircuitBreaker.SamplingDuration = TimeSpan.FromSeconds(1); 26options.TotalRequestTimeout.Timeout = TimeSpan.FromSeconds(1); 83options.TotalRequestTimeout.Timeout = TimeSpan.FromSeconds(2); 84options.AttemptTimeout.Timeout = TimeSpan.FromSeconds(3); 88options.TotalRequestTimeout.Timeout = TimeSpan.FromSeconds(2);
Resilience\HttpStandardResilienceOptionsTests.cs (2)
17_options.AttemptTimeout.Timeout.Should().Be(TimeSpan.FromSeconds(10)); 18_options.TotalRequestTimeout.Timeout.Should().Be(TimeSpan.FromSeconds(30));
Microsoft.Extensions.ServiceDiscovery (3)
Http\HttpServiceEndpointResolver.cs (1)
17private static readonly TimeSpan s_cleanupPeriod = TimeSpan.FromSeconds(10);
ServiceDiscoveryOptions.cs (1)
23public TimeSpan RefreshPeriod { get; set; } = TimeSpan.FromSeconds(60);
ServiceEndpointResolver.cs (1)
15private static readonly TimeSpan s_cleanupPeriod = TimeSpan.FromSeconds(10);
Microsoft.Extensions.ServiceDiscovery.Dns (7)
DnsServiceEndpointProviderOptions.cs (2)
19public TimeSpan MinRetryPeriod { get; set; } = TimeSpan.FromSeconds(1); 24public TimeSpan MaxRetryPeriod { get; set; } = TimeSpan.FromSeconds(30);
DnsSrvServiceEndpointProviderOptions.cs (2)
19public TimeSpan MinRetryPeriod { get; set; } = TimeSpan.FromSeconds(1); 24public TimeSpan MaxRetryPeriod { get; set; } = TimeSpan.FromSeconds(30);
FallbackDnsResolver.cs (2)
66ExpiresAt = now.Add(TimeSpan.FromSeconds(record.TimeToLive)) 79ExpiresAt = now.Add(TimeSpan.FromSeconds(record.TimeToLive)),
Resolver\ResolverOptions.cs (1)
12public TimeSpan Timeout = TimeSpan.FromSeconds(3);
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (11)
DnsServiceEndpointResolverTests.cs (3)
22.AddDnsServiceEndpointProvider(o => o.DefaultRefreshPeriod = TimeSpan.FromSeconds(30)) 28timeProvider.Advance(TimeSpan.FromSeconds(7)); 32timeProvider.Advance(TimeSpan.FromSeconds(80));
Resolver\LoopbackDnsTestBase.cs (1)
28Timeout = TimeSpan.FromSeconds(5),
Resolver\ResolveAddressesTests.cs (3)
237Options.Timeout = TimeSpan.FromSeconds(1); 248Options.Timeout = TimeSpan.FromSeconds(1); 266Options.Timeout = TimeSpan.FromSeconds(5);
Resolver\TcpFailoverTests.cs (4)
46Options.Timeout = TimeSpan.FromSeconds(60); 59AddressResult[] results = await Resolver.ResolveIPAddressesAsync(hostName, AddressFamily.InterNetwork).AsTask().WaitAsync(TimeSpan.FromSeconds(10)); 86Options.Timeout = TimeSpan.FromSeconds(1); 113Options.Timeout = TimeSpan.FromSeconds(1);
Microsoft.Extensions.ServiceDiscovery.Dns.Tests.Fuzzing (1)
Fuzzers\DnsResponseFuzzer.cs (1)
24Timeout = TimeSpan.FromSeconds(5),
Microsoft.Extensions.TimeProvider.Testing.Tests (27)
FakeTimeProviderTests.cs (21)
78timeProvider.Advance(TimeSpan.FromSeconds(1)); 81Assert.Equal(TimeSpan.FromSeconds(1), t); 89AutoAdvanceAmount = TimeSpan.FromSeconds(1) 96Assert.Equal(TimeSpan.FromSeconds(1), elapsedTime); 97Assert.Equal(TimeSpan.FromSeconds(2), elapsedTime2); 232}, null, TimeSpan.FromSeconds(1), TimeSpan.Zero); 240tp.AdjustTime(tp.GetUtcNow() + TimeSpan.FromSeconds(10)); 259}, null, TimeSpan.FromSeconds(1), TimeSpan.Zero); 267tp.AdjustTime(tp.GetUtcNow() - TimeSpan.FromSeconds(10)); 375var t = source.Task.WaitAsync(TimeSpan.FromSeconds(100000), timeProvider, CancellationToken.None); 446AutoAdvanceAmount = TimeSpan.FromSeconds(1) 454Assert.Equal(timeProvider.Start + TimeSpan.FromSeconds(1), second); 455Assert.Equal(timeProvider.Start + TimeSpan.FromSeconds(2), third); 473AutoAdvanceAmount = TimeSpan.FromSeconds(1) 485var oneSecond = TimeSpan.FromSeconds(1); 503var provider = new FakeTimeProvider { AutoAdvanceAmount = TimeSpan.FromSeconds(2) }; 505using var timer = provider.CreateTimer(calls.Add, "timer-1", TimeSpan.FromSeconds(3), TimeSpan.Zero); 544await provider.Delay(TimeSpan.FromSeconds(taskDelay)); 558await provider.Delay(TimeSpan.FromSeconds(delay)).ConfigureAwait(false); 569provider.Advance(TimeSpan.FromSeconds(taskDelay)); 572provider.Advance(TimeSpan.FromSeconds(delay));
TimerTests.cs (6)
142Assert.Throws<ArgumentOutOfRangeException>("dueTime", () => t.Change(TimeSpan.FromMilliseconds(-2), TimeSpan.FromSeconds(1))); 144Assert.Throws<ArgumentOutOfRangeException>("dueTime", () => t.Change(TimeSpan.FromMilliseconds(0xFFFFFFFFL), TimeSpan.FromSeconds(1))); 154Assert.Throws<ArgumentOutOfRangeException>("period", () => t.Change(TimeSpan.FromSeconds(1), TimeSpan.FromMilliseconds(-2))); 156Assert.Throws<ArgumentOutOfRangeException>("period", () => t.Change(TimeSpan.FromSeconds(1), TimeSpan.FromMilliseconds(0xFFFFFFFFL))); 339timers.Add(timeProvider.CreateTimer(index => triggers[(int)index!] = true, i, TimeSpan.FromSeconds(dueTimes[i]), TimeSpan.Zero)); 357timeProvider.Advance(TimeSpan.FromSeconds(2));
Microsoft.ML.AutoML (1)
AutoMLExperiment\AutoMLExperiment.cs (1)
83var timeoutManager = new TimeoutTrainingStopManager(TimeSpan.FromSeconds(trainingTimeInSeconds), channel);
Microsoft.ML.AutoML.Interactive (1)
NotebookMonitor.cs (1)
31_updateThrottler = new ActionThrottler(Update, TimeSpan.FromSeconds(5));
Microsoft.ML.AutoML.Tests (3)
StopTrainingManagerTests.cs (3)
48var manager = new TimeoutTrainingStopManager(TimeSpan.FromSeconds(1), null); 73var timeoutManager = new TimeoutTrainingStopManager(TimeSpan.FromSeconds(1), null); 97aggregationManager = new AggregateTrainingStopManager(null, new TimeoutTrainingStopManager(TimeSpan.FromSeconds(100), null), cancellationManager);
Microsoft.ML.IntegrationTests (1)
Datasets\TypeTestData.cs (1)
142Ts = TimeSpan.FromSeconds(rng.NextDouble() * (1 + rng.Next())),
Microsoft.ML.Maml (1)
MAML.cs (1)
216TimeSpan interval = TimeSpan.FromSeconds(0.6);
Microsoft.VisualStudio.LanguageServices (4)
KeybindingReset\KeybindingResetDetector.cs (1)
314await Task.Delay(TimeSpan.FromSeconds(2), cancellationToken).ConfigureAwait(false);
LanguageService\AbstractCreateServicesOnTextViewConnection.cs (1)
54TimeSpan.FromSeconds(1),
Packaging\PackageInstallerServiceFactory.cs (1)
132TimeSpan.FromSeconds(1),
Workspace\SourceGeneratedFileManager.cs (1)
289TimeSpan.FromSeconds(1),
Microsoft.VisualStudio.LanguageServices.CodeLens (1)
ReferenceCodeLensProvider.cs (1)
99await Task.Delay(TimeSpan.FromSeconds(1.5), _cancellationTokenSource.Token).ConfigureAwait(false);
Mongo.AppHost (1)
Program.cs (1)
15await Task.Delay(TimeSpan.FromSeconds(10), ct);
PortableTask (1)
Sleep.cs (1)
17Task.Delay(TimeSpan.FromSeconds(Seconds)).Wait();
PresentationCore (21)
System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (1)
581return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (1)
581return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (1)
581return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (1)
581return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (1)
581return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
PresentationFramework (4)
System\Windows\Controls\ProgressBar.cs (3)
230TimeSpan translateTime = TimeSpan.FromSeconds(((int)(endPos - startPos) / 200.0)); // travel at 200px /second 231TimeSpan pauseTime = TimeSpan.FromSeconds(1.0); // pause 1 second between animations 239startTime = TimeSpan.FromSeconds(-1*(_glow.Margin.Left-startPos)/200.0);
System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (1)
673return TimeSpan.FromSeconds(1.0);
PresentationFramework.Aero (27)
Microsoft\Windows\Themes\BulletChrome.cs (6)
120Duration duration = new Duration(TimeSpan.FromSeconds(0.2)); 173Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 268Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 344Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 437Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 502Duration duration = new Duration(TimeSpan.FromSeconds(0.3));
Microsoft\Windows\Themes\ButtonChrome.cs (12)
113Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 125daukf.KeyFrames.Add(new LinearDoubleKeyFrame(1.0, TimeSpan.FromSeconds(0.5))); 126daukf.KeyFrames.Add(new DiscreteDoubleKeyFrame(1.0, TimeSpan.FromSeconds(0.75))); 127daukf.KeyFrames.Add(new LinearDoubleKeyFrame(0.0, TimeSpan.FromSeconds(2.0))); 144Duration duration = new Duration(TimeSpan.FromSeconds(0.2)); 208Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 234daukf.KeyFrames.Add(new LinearDoubleKeyFrame(1.0, TimeSpan.FromSeconds(to1))); 235daukf.KeyFrames.Add(new DiscreteDoubleKeyFrame(1.0, TimeSpan.FromSeconds(to1 + 0.25))); 236daukf.KeyFrames.Add(new LinearDoubleKeyFrame(0.0, TimeSpan.FromSeconds(to1 + 1.5))); 245Duration duration = new Duration(TimeSpan.FromSeconds(0.2)); 299Duration duration = new Duration(TimeSpan.FromSeconds(0.1)); 332Duration duration = new Duration(TimeSpan.FromSeconds(0.1));
Microsoft\Windows\Themes\ListBoxChrome.cs (2)
137Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 149Duration duration = new Duration(TimeSpan.FromSeconds(0.2));
Microsoft\Windows\Themes\ProgressBarHighlightConverter.cs (2)
84TimeSpan translateTime = TimeSpan.FromSeconds(twiceWidth / 200.0); // travel at 200px /second 85TimeSpan pauseTime = TimeSpan.FromSeconds(1.0); // pause 1 second between animations
Microsoft\Windows\Themes\ScrollChrome.cs (5)
107Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 144Duration duration = new Duration(TimeSpan.FromSeconds(0.2)); 225Duration duration = new Duration(TimeSpan.FromSeconds(0.2)); 250Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 327Duration duration = new Duration(TimeSpan.FromSeconds(0.3));
PresentationFramework.Aero2 (27)
Microsoft\Windows\Themes\BulletChrome.cs (6)
120Duration duration = new Duration(TimeSpan.FromSeconds(0.2)); 173Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 268Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 344Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 437Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 502Duration duration = new Duration(TimeSpan.FromSeconds(0.3));
Microsoft\Windows\Themes\ButtonChrome.cs (12)
113Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 125daukf.KeyFrames.Add(new LinearDoubleKeyFrame(1.0, TimeSpan.FromSeconds(0.5))); 126daukf.KeyFrames.Add(new DiscreteDoubleKeyFrame(1.0, TimeSpan.FromSeconds(0.75))); 127daukf.KeyFrames.Add(new LinearDoubleKeyFrame(0.0, TimeSpan.FromSeconds(2.0))); 144Duration duration = new Duration(TimeSpan.FromSeconds(0.2)); 208Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 234daukf.KeyFrames.Add(new LinearDoubleKeyFrame(1.0, TimeSpan.FromSeconds(to1))); 235daukf.KeyFrames.Add(new DiscreteDoubleKeyFrame(1.0, TimeSpan.FromSeconds(to1 + 0.25))); 236daukf.KeyFrames.Add(new LinearDoubleKeyFrame(0.0, TimeSpan.FromSeconds(to1 + 1.5))); 245Duration duration = new Duration(TimeSpan.FromSeconds(0.2)); 299Duration duration = new Duration(TimeSpan.FromSeconds(0.1)); 332Duration duration = new Duration(TimeSpan.FromSeconds(0.1));
Microsoft\Windows\Themes\ListBoxChrome.cs (2)
137Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 149Duration duration = new Duration(TimeSpan.FromSeconds(0.2));
Microsoft\Windows\Themes\ProgressBarHighlightConverter.cs (2)
84TimeSpan translateTime = TimeSpan.FromSeconds(twiceWidth / 200.0); // travel at 200px /second 85TimeSpan pauseTime = TimeSpan.FromSeconds(1.0); // pause 1 second between animations
Microsoft\Windows\Themes\ScrollChrome.cs (5)
107Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 144Duration duration = new Duration(TimeSpan.FromSeconds(0.2)); 225Duration duration = new Duration(TimeSpan.FromSeconds(0.2)); 250Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); 327Duration duration = new Duration(TimeSpan.FromSeconds(0.3));
Producer (2)
ContinuousProducerWorker.cs (1)
12using var timer = new PeriodicTimer(TimeSpan.FromSeconds(10));
IntermittentProducerWorker.cs (1)
25await Task.Delay(TimeSpan.FromSeconds(10), stoppingToken);
Roslyn.VisualStudio.DiagnosticsWindow (2)
PerfMargin\StatusIndicator.xaml.cs (2)
48private static readonly DoubleAnimation s_growAnimation = new DoubleAnimation(1.0, new Duration(TimeSpan.FromSeconds(1.0)), FillBehavior.HoldEnd); 49private static readonly DoubleAnimation s_shrinkAnimation = new DoubleAnimation(0.0, new Duration(TimeSpan.FromSeconds(0.33333)), FillBehavior.HoldEnd);
RunTests (1)
AssemblyScheduler.cs (1)
234TimeSpan.FromSeconds(executionTime));
ServiceBusWorker (1)
Producer.cs (1)
13var periodicTimer = new PeriodicTimer(TimeSpan.FromSeconds(5));
Stress.ApiService (1)
Program.cs (1)
124await Task.Delay(TimeSpan.FromSeconds(0.5));
Stress.AppHost (1)
TestResource.cs (1)
72using var timer = new PeriodicTimer(TimeSpan.FromSeconds(seconds));
Stress.TelemetryService (1)
TelemetryStresser.cs (1)
37await Task.Delay(TimeSpan.FromSeconds(1), cancellationToken);
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\MetricsEventSource.cs (1)
506_aggregationManager.SetCollectionPeriod(TimeSpan.FromSeconds(refreshIntervalSecs));
System.Diagnostics.Process (1)
System\Diagnostics\Process.Unix.cs (1)
839return TimeSpan.FromSeconds(ticks / (double)ticksPerSecond);
System.Formats.Cbor (1)
System\Formats\Cbor\Reader\CborReader.Tag.cs (1)
127TimeSpan timespan = TimeSpan.FromSeconds(seconds);
System.ServiceModel.NetTcp (1)
System\ServiceModel\Channels\DnsCache.cs (1)
15private static readonly TimeSpan s_cacheTimeout = TimeSpan.FromSeconds(2);
System.ServiceModel.Primitives (5)
System\ServiceModel\Channels\LifetimeManager.cs (1)
226CloseCore(TimeSpan.FromSeconds(1), true);
System\ServiceModel\Channels\ReliableMessagingHelpers.cs (3)
738static public TimeSpan UnknownInitiationTime = TimeSpan.FromSeconds(2); 739static public TimeSpan RequestorIterationTime = TimeSpan.FromSeconds(10); 740static public TimeSpan RequestorReceiveTime = TimeSpan.FromSeconds(10);
System\ServiceModel\Dispatcher\ChannelHandler.cs (1)
19public static readonly TimeSpan CloseAfterFaultTimeout = TimeSpan.FromSeconds(10);
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\E2ETesting\WaitAssert.cs (1)
24public static TimeSpan FailureTimeout = TimeSpan.FromSeconds(E2ETestOptions.Instance.DefaultAfterFailureWaitTimeoutInSeconds);
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\E2ETesting\WaitAssert.cs (1)
24public static TimeSpan FailureTimeout = TimeSpan.FromSeconds(E2ETestOptions.Instance.DefaultAfterFailureWaitTimeoutInSeconds);
Templates.Mvc.Tests (1)
src\Shared\E2ETesting\WaitAssert.cs (1)
24public static TimeSpan FailureTimeout = TimeSpan.FromSeconds(E2ETestOptions.Instance.DefaultAfterFailureWaitTimeoutInSeconds);
Templates.Tests (1)
src\Shared\E2ETesting\WaitAssert.cs (1)
24public static TimeSpan FailureTimeout = TimeSpan.FromSeconds(E2ETestOptions.Instance.DefaultAfterFailureWaitTimeoutInSeconds);
UnitTests.Common (9)
MockAsyncResult.cs (1)
18public MockAsyncResult() : this(TimeSpan.FromSeconds(30), null, null)
MockChannelBase.cs (2)
92return TimeSpan.FromSeconds(30); 105return TimeSpan.FromSeconds(30);
MockChannelFactory.cs (2)
94return TimeSpan.FromSeconds(30); 107return TimeSpan.FromSeconds(30);
MockCommunicationObject.cs (2)
77return TimeSpan.FromSeconds(30); 90return TimeSpan.FromSeconds(30);
MockInteractiveChannelInitializer.cs (1)
29MockAsyncResult result = new MockAsyncResult(TimeSpan.FromSeconds(30), callback, state);
TestHelpers.cs (1)
20public static readonly TimeSpan TestTimeout = TimeSpan.FromSeconds(20);
VBCSCompiler.UnitTests (1)
Extensions.cs (1)
43var delay = pollTimeSpan ?? TimeSpan.FromSeconds(.25);