712 references to FromSeconds
AnalyzerRunner (1)
Program.cs (1)
103await Task.Delay(TimeSpan.FromSeconds(5)).ConfigureAwait(false);
aspire (2)
Backchannel\ExtensionBackchannel.cs (1)
105if (waitingFor > TimeSpan.FromSeconds(10))
DotNetCliRunner.cs (1)
551if (waitingFor > TimeSpan.FromSeconds(10))
Aspire.Azure.AI.OpenAI.Tests (1)
AspireAzureAIOpenAIExtensionsTests.cs (1)
159var networkTimeout = TimeSpan.FromSeconds(123);
Aspire.Cli.Tests (12)
CliTestConstants.cs (2)
8public static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(10); 9public static readonly TimeSpan LongTimeout = TimeSpan.FromSeconds(10);
Hosting\CliOrphanDetectorTests.cs (9)
29await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 48await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 74await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 77fakeTimeProvider.Advance(TimeSpan.FromSeconds(1)); 80fakeTimeProvider.Advance(TimeSpan.FromSeconds(1)); 83fakeTimeProvider.Advance(TimeSpan.FromSeconds(1)); 86fakeTimeProvider.Advance(TimeSpan.FromSeconds(1)); 116await resourcesCreatedTcs.Task.WaitAsync(TimeSpan.FromSeconds(60)); 119await pendingRun.WaitAsync(TimeSpan.FromSeconds(60));
TestServices\TestAppHostBackchannel.cs (1)
78using 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)
170await loadingTcs.Task.WaitAsync(TimeSpan.FromSeconds(5), _resourceSubscriptionToken);
Model\DashboardCommandExecutor.cs (1)
78await Task.Delay(TimeSpan.FromSeconds(1)).ConfigureAwait(false);
Model\MetricsHelpers.cs (1)
63await 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)
267var startupTimeoutTask = Task.Delay(TimeSpan.FromSeconds(AppStartupWaitTimeoutSecs), token); 290var allOutputCompleteTimeoutTask = Task.Delay(TimeSpan.FromSeconds(5), token); 358cts.CancelAfter(TimeSpan.FromSeconds(DashboardAvailabilityTimeoutSecs)); 376Delay = TimeSpan.FromSeconds(1) 466.WithTimeout(TimeSpan.FromSeconds(30)); 479.WithTimeout(TimeSpan.FromSeconds(30)); 507handler.PooledConnectionLifetime = TimeSpan.FromSeconds(5); 508handler.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 (18)
Cli\CliOrphanDetector.cs (1)
36using 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)
40private static readonly TimeSpan s_disposeTimeout = TimeSpan.FromSeconds(10);
Dcp\DcpHost.cs (1)
99await Task.Delay(TimeSpan.FromSeconds(2), timeoutCancellation.Token).ConfigureAwait(false);
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)
201TimeSpan timeout = TimeSpan.FromSeconds(30); 205timeout = 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 (12)
AzureCosmosDBEmulatorFunctionalTests.cs (2)
73Delay = TimeSpan.FromSeconds(10), 144Delay = 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)
39using 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)
308.WithPersistence(TimeSpan.FromSeconds(10)); 325.WithPersistence(TimeSpan.FromSeconds(60));
GarnetFunctionalTests.cs (2)
62.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(3) }) 106.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(10) })
Aspire.Hosting.Kafka.Tests (3)
KafkaFunctionalTests.cs (3)
89.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<ProduceException<string, string>>() }) 176.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<ProduceException<string, string>>() }) 229.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<ConsumeException>() })
Aspire.Hosting.MongoDB.Tests (4)
MongoDbFunctionalTests.cs (4)
73.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1) }) 111.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1) }) 255.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 353.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
Aspire.Hosting.MySql.Tests (7)
MySqlFunctionalTests.cs (7)
71.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2), ShouldHandle = new PredicateBuilder().Handle<MySqlException>() }) 125.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 302.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2), ShouldHandle = new PredicateBuilder().Handle<MySqlException>() }) 389.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2), ShouldHandle = new PredicateBuilder().Handle<MySqlException>() }) 473.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<MySqlException>() }) 617.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 691.AddRetry(new() { MaxRetryAttempts = 3, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
Aspire.Hosting.Oracle.Tests (3)
OracleFunctionalTests.cs (3)
88Delay = TimeSpan.FromSeconds(2) 258Delay = TimeSpan.FromSeconds(2) 356Delay = TimeSpan.FromSeconds(2)
Aspire.Hosting.PostgreSQL.Tests (5)
PostgresFunctionalTests.cs (5)
102.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<NpgsqlException>() }) 198.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<NpgsqlException>() }) 365.AddRetry(new() { MaxRetryAttempts = 3, Delay = TimeSpan.FromSeconds(2) }) 453.AddRetry(new() { MaxRetryAttempts = 3, Delay = TimeSpan.FromSeconds(2) }) 686.AddRetry(new() { MaxRetryAttempts = 3, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
Aspire.Hosting.Python.Tests (1)
AddPythonAppTests.cs (1)
104await app.ResourceNotifications.WaitForResourceAsync("pyproj", "Finished").WaitAsync(TimeSpan.FromSeconds(30));
Aspire.Hosting.Qdrant.Tests (2)
QdrantFunctionalTests.cs (2)
30.AddRetry(new() { MaxRetryAttempts = 10, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<RpcException>() }) 94.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)
648.WithPersistence(TimeSpan.FromSeconds(10), 2); 669.WithPersistence(TimeSpan.FromSeconds(60));
RedisFunctionalTests.cs (2)
183var cts2 = new CancellationTokenSource(TimeSpan.FromSeconds(2)); 551.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
Aspire.Hosting.SqlServer.Tests (5)
SqlServerFunctionalTests.cs (5)
67.AddRetry(new() { MaxRetryAttempts = int.MaxValue, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 132.AddRetry(new() { MaxRetryAttempts = int.MaxValue, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 340.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 406.AddRetry(new() { MaxRetryAttempts = 3, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) }) 459.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 (35)
Backchannel\AppHostBackchannelTests.cs (15)
38await app.StartAsync().WaitAsync(TimeSpan.FromSeconds(60)); 40var backchannelReadyEvent = await backchannelReadyTaskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(60)); 44await socket.ConnectAsync(endpoint).WaitAsync(TimeSpan.FromSeconds(60)); 46_ = await backchannelConnectedTaskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(60)); 51await app.StopAsync().WaitAsync(TimeSpan.FromSeconds(60)); 68await app.StartAsync().WaitAsync(TimeSpan.FromSeconds(60)); 70var backchannelReadyEvent = await backchannelReadyTaskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(60)); 74await socket.ConnectAsync(endpoint).WaitAsync(TimeSpan.FromSeconds(60)); 82[timestampOut]).WaitAsync(TimeSpan.FromSeconds(60)); 86await app.StopAsync().WaitAsync(TimeSpan.FromSeconds(60)); 111await app.StartAsync().WaitAsync(TimeSpan.FromSeconds(60)); 113var backchannelReadyEvent = await backchannelReadyTaskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(60)); 117await socket.ConnectAsync(endpoint).WaitAsync(TimeSpan.FromSeconds(60)); 125).WaitAsync(TimeSpan.FromSeconds(60)); 136await app.StopAsync().WaitAsync(TimeSpan.FromSeconds(60));
Codespaces\CodespacesUrlRewriterTests.cs (2)
29var abortToken = new CancellationTokenSource(TimeSpan.FromSeconds(60)); 66var abortToken = new CancellationTokenSource(TimeSpan.FromSeconds(60));
DistributedApplicationTests.cs (1)
1069ConnectTimeout = TimeSpan.FromSeconds(2)
Eventing\DistributedApplicationBuilderEventingTests.cs (2)
220var fired = countdownEvent.Wait(TimeSpan.FromSeconds(10)); 263TimeSpan.FromSeconds(10)
Health\ResourceHealthCheckServiceTests.cs (4)
321timeProvider.Advance(TimeSpan.FromSeconds(5)); 324timeProvider.Advance(TimeSpan.FromSeconds(5)); 331Assert.Equal(TimeSpan.FromSeconds(10), duration); 487rhcs.HealthyHealthCheckInterval = TimeSpan.FromSeconds(1);
Publishing\PublishingActivityProgressReporterTests.cs (1)
498using var cts = new CancellationTokenSource(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)
16cts.CancelAfter(TimeSpan.FromSeconds(1)); 23await foreach (var _ in PeriodicRestartAsyncEnumerable.CreateAsync(innerFactory, restartInterval: TimeSpan.FromSeconds(2), cancellationToken: cts.Token).ConfigureAwait(false)) 25if (DateTime.UtcNow - start > TimeSpan.FromSeconds(2)) 40cts.CancelAfter(TimeSpan.FromSeconds(1)); 48if (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)
298.WithPersistence(TimeSpan.FromSeconds(10), 2); 315.WithPersistence(TimeSpan.FromSeconds(60));
Aspire.Hosting.Yarp.Tests (4)
YarpConfigGeneratorTests.cs (4)
23Timeout = TimeSpan.FromSeconds(1), 150Interval = TimeSpan.FromSeconds(4), 151Timeout = TimeSpan.FromSeconds(6), 194ActivityTimeout = TimeSpan.FromSeconds(60),
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (11)
AspireAzureEfCoreCosmosDBExtensionsTests.cs (7)
31cosmosBuilder.RequestTimeout(TimeSpan.FromSeconds(608)); 44Assert.Equal(TimeSpan.FromSeconds(608), extension.RequestTimeout); 70configureSettings: useSettings ? settings => settings.RequestTimeout = TimeSpan.FromSeconds(608) : null); 81Assert.Equal(TimeSpan.FromSeconds(608), extension.RequestTimeout); 107cosmosBuilder.RequestTimeout(TimeSpan.FromSeconds(123)); 110configureSettings: useSettings ? settings => settings.RequestTimeout = TimeSpan.FromSeconds(300) : null); 121Assert.Equal(TimeSpan.FromSeconds(123), extension.RequestTimeout);
EnrichCosmosDbTests.cs (4)
59builder.RequestTimeout(TimeSpan.FromSeconds(123)); 75Assert.Equal(TimeSpan.FromSeconds(123), extension.RequestTimeout); 128optionsBuilder.UseCosmos(ConnectionString, DatabaseName, builder => builder.RequestTimeout(TimeSpan.FromSeconds(123))); 131builder.EnrichCosmosDbContext<TestDbContext>(settings => settings.RequestTimeout = TimeSpan.FromSeconds(456));
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)
src\Components\Aspire.RabbitMQ.Client\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)); 331.WithTimeout(TimeSpan.FromSeconds(testRunTimeoutSecs)); 338.WithTimeout(TimeSpan.FromSeconds(testRunTimeoutSecs));
tests\Shared\TemplatesTesting\AspireProject.cs (8)
267var startupTimeoutTask = Task.Delay(TimeSpan.FromSeconds(AppStartupWaitTimeoutSecs), token); 290var allOutputCompleteTimeoutTask = Task.Delay(TimeSpan.FromSeconds(5), token); 358cts.CancelAfter(TimeSpan.FromSeconds(DashboardAvailabilityTimeoutSecs)); 376Delay = TimeSpan.FromSeconds(1) 466.WithTimeout(TimeSpan.FromSeconds(30)); 479.WithTimeout(TimeSpan.FromSeconds(30)); 507handler.PooledConnectionLifetime = TimeSpan.FromSeconds(5); 508handler.ConnectTimeout = TimeSpan.FromSeconds(5);
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
164var completedTask = await Task.WhenAny(waitForExitTask, Task.Delay(TimeSpan.FromSeconds(5), token)).ConfigureAwait(false);
AzureSearch.ApiService (1)
Program.cs (1)
172await Task.Delay(TimeSpan.FromSeconds(2), cancellationToken);
Binding.ReliableSession.IntegrationTests (2)
NetHttpBindingTests.cs (1)
360TimeSpan keepAliveInterval = TimeSpan.FromSeconds(2);
WSHttpBindingTests.cs (1)
360TimeSpan keepAliveInterval = TimeSpan.FromSeconds(2);
Client.TypedClient.IntegrationTests (2)
TypedProxyTests.4.0.0.cs (2)
25static TimeSpan maxTestWaitTime = TimeSpan.FromSeconds(10); 312replyMessage = channel.Request(requestMessage, TimeSpan.FromSeconds(60));
Consumer (1)
ConsumerWorker.cs (1)
21result = consumer.Consume(TimeSpan.FromSeconds(1));
Contract.Service.IntegrationTests (3)
ServiceContractTests.4.1.0.cs (3)
679TimeSpan delayOperation = TimeSpan.FromSeconds(3); 769TimeSpan delayOperation = TimeSpan.FromSeconds(3); 859TimeSpan delayOperation = TimeSpan.FromSeconds(3);
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);
GetDocument.Insider (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.7.25327.102\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
35return TimeSpan.FromSeconds((int)timeoutInSeconds);
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.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.Build (2)
Tracing.cs (2)
64s_interval = TimeSpan.FromSeconds(seconds); 68s_interval = TimeSpan.FromSeconds(1);
Microsoft.Build.Tasks.Core (2)
Tracing.cs (2)
64s_interval = TimeSpan.FromSeconds(seconds); 68s_interval = TimeSpan.FromSeconds(1);
Microsoft.Build.Utilities.Core (2)
Tracing.cs (2)
64s_interval = TimeSpan.FromSeconds(seconds); 68s_interval = TimeSpan.FromSeconds(1);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Workspaces\WorkspaceTests_EditorFeatures.cs (4)
809var shortEventTimeout = TimeSpan.FromSeconds(5); 876var shortEventTimeout = TimeSpan.FromSeconds(5); 939var shortEventTimeout = TimeSpan.FromSeconds(5); 1000var shortEventTimeout = TimeSpan.FromSeconds(5);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Emit\CompilationEmitTests.cs (1)
1916Thread.Sleep(TimeSpan.FromSeconds(3));
Emit\DeterministicTests.cs (1)
61Thread.Sleep(TimeSpan.FromSeconds(1));
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.Features (4)
Completion\CompletionService.ProviderManager.cs (1)
43TimeSpan.FromSeconds(1),
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionCacheServiceFactory.cs (1)
31TimeSpan.FromSeconds(1),
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
170var timeout = TimeSpan.FromSeconds(5);
SymbolSearch\Windows\SymbolSearchUpdateEngine.DelayService.cs (1)
14public TimeSpan FileWriteDelay { get; } = TimeSpan.FromSeconds(10);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (6)
Diagnostics\PullDiagnosticTests.cs (5)
2042await Task.Delay(TimeSpan.FromSeconds(5)); 2070await Task.Delay(TimeSpan.FromSeconds(5)); 2099await Task.Delay(TimeSpan.FromSeconds(5)); 2129await Task.Delay(TimeSpan.FromSeconds(5)); 2155await Task.Delay(TimeSpan.FromSeconds(5));
Workspaces\LspWorkspaceManagerTests.cs (1)
706await Task.Delay(TimeSpan.FromSeconds(1));
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Host\RemoteWorkspaceManager.cs (1)
53=> new SolutionAssetCache(workspace, cleanupInterval: TimeSpan.FromSeconds(30), purgeAfter: TimeSpan.FromMinutes(1));
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\ProjectSystem\FileWatchedPortableExecutableReferenceFactory.cs (1)
60TimeSpan.FromSeconds(5),
Workspace\Solution\TextLoader.cs (1)
25internal static readonly TimeSpan RetryDelay = TimeSpan.FromSeconds(MaxDelaySecs / MaxRetries);
Microsoft.DotNet.Arcade.Sdk (1)
src\DownloadFile.cs (1)
158httpClient.Timeout = TimeSpan.FromSeconds(TimeoutInSeconds);
Microsoft.DotNet.Build.Tasks.Installers (1)
src\ExecWithRetries.cs (1)
98TimeSpan delay = TimeSpan.FromSeconds(
Microsoft.DotNet.Helix.Client (1)
HelixApiOptions.cs (1)
23Retry.Delay = TimeSpan.FromSeconds(DefaultRetryDelaySeconds);
Microsoft.DotNet.Helix.JobSender (3)
StorageHelpers\StorageRetryPolicy.cs (2)
17options.Retry.Delay = TimeSpan.FromSeconds(5); 18options.Retry.MaxDelay = TimeSpan.FromSeconds(30);
WorkItemDefinition.cs (1)
25public static TimeSpan DefaultTimeout { get; } = TimeSpan.FromSeconds(300);
Microsoft.DotNet.SignCheckTask (1)
src\SignCheck.cs (1)
475httpClient.Timeout = TimeSpan.FromSeconds(10000); // 10 seconds
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)
1007string key3 = AIJsonUtilities.HashDataToString([TimeSpan.FromSeconds(1), null, 1.23], options); 1008string 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 (4)
ScenarioRunResultTests.cs (4)
65latency: TimeSpan.FromSeconds(1), 73latency: TimeSpan.FromSeconds(2), 156latency: TimeSpan.FromSeconds(1), 164latency: TimeSpan.FromSeconds(2),
Microsoft.Extensions.Caching.Hybrid.Tests (1)
TestEventListener.cs (1)
182await Task.Delay(TimeSpan.FromSeconds(EventCounterIntervalSec * 2));
Microsoft.Extensions.Caching.StackExchangeRedis (4)
RedisCache.cs (4)
63private readonly TimeSpan ReconnectMinInterval = TimeSpan.FromSeconds(60); 66private readonly TimeSpan ReconnectErrorThreshold = TimeSpan.FromSeconds(30); 188var setTtl = batch.KeyExpireAsync(prefixedKey, TimeSpan.FromSeconds(ttl.GetValueOrDefault())); 237cache.KeyExpireAsync(prefixedKey, TimeSpan.FromSeconds(ttl.GetValueOrDefault()))
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (32)
TimeExpirationAsyncTests.cs (16)
62await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1))); 69await Task.Delay(TimeSpan.FromSeconds(0.5)); 83await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 128await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1))); 135await Task.Delay(TimeSpan.FromSeconds(0.5)); 148await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 190await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(1))); 195await Task.Delay(TimeSpan.FromSeconds(3.5)); 208await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(0.25))); 221await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(1))); 228await Task.Delay(TimeSpan.FromSeconds(0.5)); 234await Task.Delay(TimeSpan.FromSeconds(3)); 247.SetSlidingExpiration(TimeSpan.FromSeconds(1)) 248.SetAbsoluteExpiration(TimeSpan.FromSeconds(3))); 256await Task.Delay(TimeSpan.FromSeconds(0.5)); 265await Task.Delay(TimeSpan.FromSeconds(0.5));
TimeExpirationTests.cs (16)
45cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1))); 52Thread.Sleep(TimeSpan.FromSeconds(0.5)); 66cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 112cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1))); 119Thread.Sleep(TimeSpan.FromSeconds(0.5)); 132cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 175cache.Set(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(1))); 180Thread.Sleep(TimeSpan.FromSeconds(3.5)); 193cache.Set(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(0.25))); 206cache.Set(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(1))); 213Thread.Sleep(TimeSpan.FromSeconds(0.5)); 219Thread.Sleep(TimeSpan.FromSeconds(3)); 232.SetSlidingExpiration(TimeSpan.FromSeconds(1)) 233.SetAbsoluteExpiration(TimeSpan.FromSeconds(3))); 241Thread.Sleep(TimeSpan.FromSeconds(0.5)); 250Thread.Sleep(TimeSpan.FromSeconds(0.5));
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 (54)
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));
Providers\ConditionallyFaultProvider.cs (2)
36TimeSpan.FromSeconds(1), 37TimeSpan.FromSeconds(1),
Providers\FakeProvider.cs (2)
13TimeSpan.FromSeconds(1), 14TimeSpan.FromSeconds(1),
ResourceMonitoringExtensionsTests.cs (10)
131options.CollectionWindow = TimeSpan.FromSeconds(SamplingWindowValue); 132options.PublishingWindow = TimeSpan.FromSeconds(CalculationPeriodValue); 140Assert.Equal(TimeSpan.FromSeconds(SamplingWindowValue), options!.Value.CollectionWindow); 141Assert.Equal(TimeSpan.FromSeconds(CalculationPeriodValue), options!.Value.PublishingWindow); 155= TimeSpan.FromSeconds(SamplingWindowValue).ToString(), 157= TimeSpan.FromSeconds(SamplingPeriodValue).ToString(), 159= TimeSpan.FromSeconds(CalculationPeriod).ToString() 180Assert.Equal(TimeSpan.FromSeconds(SamplingWindowValue), options!.Value.CollectionWindow); 181Assert.Equal(TimeSpan.FromSeconds(SamplingPeriodValue), options!.Value.SamplingInterval); 182Assert.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.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.Logging.AzureAppServices (1)
BatchingLoggerOptions.cs (1)
15private TimeSpan _flushPeriod = TimeSpan.FromSeconds(1);
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 (5)
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);
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 (2)
FakeTimeProviderTests.cs (2)
544await provider.Delay(TimeSpan.FromSeconds(taskDelay)); 569provider.Advance(TimeSpan.FromSeconds(taskDelay));
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)
291TimeSpan.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)
17await 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)
106await 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);
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 (3)
src\Compilers\Server\VBCSCompiler\BuildServerController.cs (1)
74return TimeSpan.FromSeconds(keepAliveValue);
src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (1)
196timeout = TimeSpan.FromSeconds(result);
src\Compilers\Server\VBCSCompiler\ServerDispatcher.cs (1)
52internal static readonly TimeSpan GCTimeout = TimeSpan.FromSeconds(30);
VBCSCompiler.UnitTests (7)
BuildClientTests.cs (1)
144var oneSec = TimeSpan.FromSeconds(1);
BuildServerConnectionTests.cs (1)
101timeoutOverride: (int)TimeSpan.FromSeconds(2).TotalMilliseconds,
BuildServerControllerTests.cs (1)
35Assert.Equal(TimeSpan.FromSeconds(42), _controller.GetKeepAliveTimeout());
Extensions.cs (1)
43var delay = pollTimeSpan ?? TimeSpan.FromSeconds(.25);
VBCSCompilerServerTests.cs (3)
285keepAlive: TimeSpan.FromSeconds(3), 310? ProtocolUtil.CreateEmptyCSharpWithKeepAlive(TimeSpan.FromSeconds(3), workingDirectory) 347await serverData.SendAsync(ProtocolUtil.CreateEmptyCSharpWithKeepAlive(TimeSpan.FromSeconds(3), workingDirectory));