107 references to TimeSpan
dotnet-svcutil-lib (11)
FrameworkFork\Microsoft.Xml\Xml\schema\XsdDateTime.cs (8)
374return new DateTime(_dt.Subtract(new TimeSpan(ZoneHour, ZoneMinute, 0)).Ticks, DateTimeKind.Utc); 377return new DateTime(_dt.Add(new TimeSpan(ZoneHour, ZoneMinute, 0)).Ticks, DateTimeKind.Utc); 431ticks = result.Ticks - new TimeSpan(xdt.ZoneHour, xdt.ZoneMinute, 0).Ticks; 444ticks = result.Ticks + new TimeSpan(xdt.ZoneHour, xdt.ZoneMinute, 0).Ticks; 486result = new DateTimeOffset(dt, new TimeSpan(xdt.ZoneHour, xdt.ZoneMinute, 0)); 489result = new DateTimeOffset(dt, new TimeSpan(-xdt.ZoneHour, -xdt.ZoneMinute, 0)); 697return _dt.Subtract(new TimeSpan(ZoneHour, ZoneMinute, 0)); 699return _dt.Add(new TimeSpan(ZoneHour, ZoneMinute, 0));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DateTimeOffsetAdapter.cs (2)
50return new DateTimeOffset(value.UtcDateTime, new TimeSpan(0, value.OffsetMinutes, 0)); 58return deserialized.ToOffset(new TimeSpan(0, value.OffsetMinutes, 0));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlConverter.cs (1)
987TimeSpan ts = new TimeSpan(hourDelta, minuteDelta, 0);
Microsoft.AspNetCore.Server.HttpSys (1)
TimeoutManager.cs (1)
174return new TimeSpan(0, 0, (int)_timeouts[(int)type]);
Microsoft.Build (1)
BackEnd\Components\Communications\NodeEndpointInProc.cs (1)
400if (!_packetPump.Join((int)new TimeSpan(0, 0, BuildParameters.EndpointShutdownTimeout).TotalMilliseconds))
Microsoft.Extensions.AI.Abstractions.Tests (1)
parent\parent\Shared\JsonSchemaExporter\TestTypes.cs (1)
90Value: new(hours: 5, minutes: 13, seconds: 3),
Microsoft.ML.Data (1)
DataLoadSave\Binary\Codecs.cs (1)
746value = new DateTimeOffset(new DateTime(ticks == long.MinValue ? default : ticks), new TimeSpan(0, offset == short.MinValue ? default : offset, 0));
Microsoft.ML.Tests (16)
Scenarios\Api\TestApi.cs (16)
423DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(1, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 0) 427DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(2, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 10) 431DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(1, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 10) 435DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(2, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 0) 439DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(3, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 20) 443DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(4, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 30) 447DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(3, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 30) 451DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(4, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 20)
Microsoft.Net.Http.Headers (1)
CacheControlHeaderValue.cs (1)
786timeSpan = new TimeSpan(0, 0, seconds);
Microsoft.Private.Windows.Core (1)
System\Value.PackedDateTimeOffset.cs (1)
70TimeSpan offset = new(
PresentationCore (1)
System\Windows\Media\Animation\AnimationTimeline.cs (1)
129return new TimeSpan(0, 0, 1);
PresentationFramework (3)
MS\Internal\Documents\TextBoxView.cs (1)
1089Interval = new TimeSpan(0, 0, _throttleBackgroundSeconds)
MS\Internal\PtsHost\BackgroundFormatInfo.cs (1)
94Interval = new TimeSpan(0, 0, (int)_throttleBackgroundSeconds)
System\Windows\Window.cs (1)
6470_taskbarRetryTimer = new DispatcherTimer { Interval = new TimeSpan(0, 1, 0) };
Shared.Tests (1)
JsonSchemaExporter\TestTypes.cs (1)
90Value: new(hours: 5, minutes: 13, seconds: 3),
System.Data.Common (1)
System\Data\Filter\FunctionNode.cs (1)
561return new DateTimeOffset((DateTime)argumentValues[0], new TimeSpan((int)argumentValues[1], (int)argumentValues[2], 0));
System.Data.Odbc (2)
Common\System\Data\ProviderBase\DbBuffer.cs (1)
698return new TimeSpan(
Common\System\Data\ProviderBase\DbConnectionPoolOptions.cs (1)
30_loadBalanceTimeout = new TimeSpan(0, 0, loadBalanceTimeout);
System.Data.OleDb (2)
System\Data\ProviderBase\DbBuffer.cs (1)
651return new TimeSpan(
System\Data\ProviderBase\DbConnectionPoolOptions.cs (1)
31_loadBalanceTimeout = new TimeSpan(0, 0, loadBalanceTimeout);
System.DirectoryServices (5)
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLink.cs (2)
22private readonly TimeSpan _systemDefaultInterval = new TimeSpan(0, 15, 0); 295return new TimeSpan(0, tmpValue, 0);
System\DirectoryServices\ActiveDirectory\ADSearcher.cs (1)
11private static readonly TimeSpan s_defaultTimeSpan = new TimeSpan(0, 120, 0);
System\DirectoryServices\ActiveDirectory\ConfigSet.cs (1)
30private static readonly TimeSpan s_locationTimeout = new TimeSpan(0, 4, 0);
System\DirectoryServices\DirectorySearcher.cs (1)
23private static readonly TimeSpan s_minusOneSecond = new TimeSpan(0, 0, -1);
System.DirectoryServices.AccountManagement (9)
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_Query.cs (1)
122((DirectorySearcher)ps.UnderlyingSearcher).ServerTimeLimit = new TimeSpan(0, 0, 30); // 30 seconds
System\DirectoryServices\AccountManagement\AD\ADStoreCtx.cs (4)
1033ds.ServerTimeLimit = new TimeSpan(0, 0, 30); // 30 seconds 1436ds.ServerTimeLimit = new TimeSpan(0, 0, 30); // 30 seconds 1712ds.ServerTimeLimit = new TimeSpan(0, 0, 30); // 30 seconds 1815ds.ServerTimeLimit = new TimeSpan(0, 0, 30); // 30 seconds
System\DirectoryServices\AccountManagement\AD\SDSUtils.cs (1)
770ds.ClientTimeout = new TimeSpan(0, 0, 30);
System\DirectoryServices\AccountManagement\SAM\SAMQuerySet.cs (2)
376value = DateTime.UtcNow - new TimeSpan(0, 0, secondsLapsed); 759storeValue = DateTime.UtcNow - new TimeSpan(0, 0, secondsLapsed);
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_LoadStore.cs (1)
867Nullable<DateTime> dt = DateTime.UtcNow - new TimeSpan(0, 0, secondsLapsed);
System.DirectoryServices.Protocols (1)
System\DirectoryServices\Protocols\common\DirectoryConnection.cs (1)
14internal TimeSpan _connectionTimeOut = new TimeSpan(0, 0, 30);
System.Formats.Asn1 (2)
System\Formats\Asn1\AsnDecoder.GeneralizedTime.cs (1)
316TimeSpan tmp = new TimeSpan(offsetHour, offsetMinute, 0);
System\Formats\Asn1\AsnDecoder.UtcTime.cs (1)
204TimeSpan offset = new TimeSpan(offsetHour, offsetMinute, 0);
System.Net.Http (3)
System\Net\Http\Headers\CacheControlHeaderValue.cs (1)
551timeSpan = new TimeSpan(0, 0, seconds);
System\Net\Http\Headers\RetryConditionHeaderValue.cs (1)
140parsedValue = new RetryConditionHeaderValue(new TimeSpan(0, 0, deltaSeconds));
System\Net\Http\Headers\TimeSpanHeaderParser.cs (1)
43parsedValue = new TimeSpan(0, 0, result);
System.Net.Mail (9)
System\Net\Mime\SmtpDateTime.cs (9)
67{ "EDT", new TimeSpan(-4, 0, 0) }, // -0400 68{ "EST", new TimeSpan(-5, 0, 0) }, // -0500 69{ "CDT", new TimeSpan(-5, 0, 0) }, // -0500 70{ "CST", new TimeSpan(-6, 0, 0) }, // -0600 71{ "MDT", new TimeSpan(-6, 0, 0) }, // -0600 72{ "MST", new TimeSpan(-7, 0, 0) }, // -0700 73{ "PDT", new TimeSpan(-7, 0, 0) }, // -0700 74{ "PST", new TimeSpan(-8, 0, 0) }, // -0800 324timeZone = new TimeSpan(hours, minutes, 0);
System.Private.CoreLib (18)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\RuntimeEventSource.cs (8)
82_gen0GCCounter ??= new IncrementingPollingCounter("gen-0-gc-count", this, () => GC.CollectionCount(0)) { DisplayName = "Gen 0 GC Count", DisplayRateTimeScale = new TimeSpan(0, 1, 0) }; 83_gen1GCCounter ??= new IncrementingPollingCounter("gen-1-gc-count", this, () => GC.CollectionCount(1)) { DisplayName = "Gen 1 GC Count", DisplayRateTimeScale = new TimeSpan(0, 1, 0) }; 84_gen2GCCounter ??= new IncrementingPollingCounter("gen-2-gc-count", this, () => GC.CollectionCount(2)) { DisplayName = "Gen 2 GC Count", DisplayRateTimeScale = new TimeSpan(0, 1, 0) }; 87_monitorContentionCounter ??= new IncrementingPollingCounter("monitor-lock-contention-count", this, () => Monitor.LockContentionCount) { DisplayName = "Monitor Lock Contention Count", DisplayRateTimeScale = new TimeSpan(0, 0, 1) }; 89_completedItemsCounter ??= new IncrementingPollingCounter("threadpool-completed-items-count", this, () => ThreadPool.CompletedWorkItemCount) { DisplayName = "ThreadPool Completed Work Item Count", DisplayRateTimeScale = new TimeSpan(0, 0, 1) }; 90_allocRateCounter ??= new IncrementingPollingCounter("alloc-rate", this, () => GC.GetTotalAllocatedBytes()) { DisplayName = "Allocation Rate", DisplayUnits = "B", DisplayRateTimeScale = new TimeSpan(0, 0, 1) }; 98_exceptionCounter ??= new IncrementingPollingCounter("exception-count", this, () => Exception.GetExceptionCount()) { DisplayName = "Exception Count", DisplayRateTimeScale = new TimeSpan(0, 0, 1) }; 110_jitTimeCounter ??= new IncrementingPollingCounter("time-in-jit", this, () => Runtime.JitInfo.GetCompilationTime().TotalMilliseconds) { DisplayName = "Time spent in JIT", DisplayUnits = "ms", DisplayRateTimeScale = new TimeSpan(0, 0, 1) };
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (3)
570result = new TimeSpan(hourOffset, minuteOffset, 0); 3340result = (new TimeSpan(hourOffset, minuteOffset, 0)); 5286result.timeZoneOffset = new TimeSpan(offsetHours, offsetMinutes, 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.StringSerializer.cs (1)
554return new TimeSpan(hours: 0, minutes: token, seconds: 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (6)
118_baseUtcOffset = new TimeSpan(_baseUtcOffset.Hours, _baseUtcOffset.Minutes, 0); 665result = new TimeSpan(result.Hours, result.Minutes, 0); 734daylightSavingsTimeSpan = new TimeSpan(1, 0, 0); 796result = new TimeSpan(hours, 0, 0); 826timeOffset = new TimeSpan(timeOffset.GetValueOrDefault().Hours, timeOffset.GetValueOrDefault().Minutes, timeOffset.GetValueOrDefault().Seconds); 1313UtcOffset = new TimeSpan(0, 0, TZif_ToInt32(data, index + 00));
System.Private.DataContractSerialization (3)
System\Runtime\Serialization\DateTimeOffsetAdapter.cs (2)
45return new DateTimeOffset(value.UtcDateTime, new TimeSpan(0, value.OffsetMinutes, 0)); 53return deserialized.ToOffset(new TimeSpan(0, value.OffsetMinutes, 0));
System\Xml\XmlConverter.cs (1)
947TimeSpan ts = new TimeSpan(hourDelta, minuteDelta, 0);
System.Private.Windows.Core (1)
System\Value.PackedDateTimeOffset.cs (1)
70TimeSpan offset = new(
System.Private.Xml (6)
System\Xml\Schema\XsdDateTime.cs (6)
386XsdDateTimeKind.LocalEastOfZulu => new DateTime(_dt.Subtract(new TimeSpan(ZoneHour, ZoneMinute, 0)).Ticks, DateTimeKind.Utc), 387XsdDateTimeKind.LocalWestOfZulu => new DateTime(_dt.Add(new TimeSpan(ZoneHour, ZoneMinute, 0)).Ticks, DateTimeKind.Utc), 440ticks = result.Ticks - new TimeSpan(xdt.ZoneHour, xdt.ZoneMinute, 0).Ticks; 453ticks = result.Ticks + new TimeSpan(xdt.ZoneHour, xdt.ZoneMinute, 0).Ticks; 495result = new DateTimeOffset(dt, new TimeSpan(xdt.ZoneHour, xdt.ZoneMinute, 0)); 498result = new DateTimeOffset(dt, new TimeSpan(-xdt.ZoneHour, -xdt.ZoneMinute, 0));
System.Runtime.Caching (5)
System\Runtime\Caching\CacheExpires.cs (3)
760internal static readonly TimeSpan MIN_UPDATE_DELTA = new TimeSpan(0, 0, 1); 761internal static readonly TimeSpan MIN_FLUSH_INTERVAL = new TimeSpan(0, 0, 1); 762internal static readonly TimeSpan _tsPerBucket = new TimeSpan(0, 0, 20);
System\Runtime\Caching\CacheUsage.cs (2)
821internal static readonly TimeSpan NEWADD_INTERVAL = new TimeSpan(0, 0, 10); 822internal static readonly TimeSpan CORRELATED_REQUEST_TIMEOUT = new TimeSpan(0, 0, 1);
System.Security.Cryptography (1)
System\Security\Cryptography\X509Certificates\FindPal.Windows.cs (1)
451new TimeSpan(0, 0, 0),
System.ServiceProcess.ServiceController (1)
System\ServiceProcess\ServiceController.cs (1)
952currentDependent.WaitForStatus(ServiceControllerStatus.Stopped, new TimeSpan(0, 0, 30));