91 references to FromTicks
mscorlib (1)
system\runtime\remoting\lifetimeservices.cs (1)
47return TimeSpan.FromTicks(Volatile.Read(ref ticks));
PresentationCore (69)
Core\CSharp\System\Windows\Media\Animation\Clock.cs (8)
2107localProgress = TimeSpan.FromTicks(offsetFromBegin.Ticks % _currentDuration.TimeSpan.Ticks); 2225localProgress = TimeSpan.FromTicks(offsetOnLaterIterations % _resolvedDuration.TimeSpan.Ticks); 2425_currentTime = TimeSpan.FromTicks((long)((t * durationInTicks) + 0.5)); 2559effectiveDuration = TimeSpan.FromTicks((long)(presentAndFutureDuration / _appliedSpeedRatio + 0.5)) + previousIterationDuration; 3231_syncData.PreviousSyncClockTime = TimeSpan.FromTicks(ourSyncTimeST.Ticks % syncClockDuration.TimeSpan.Ticks); 3545return TimeSpan.FromTicks(desiredFrameTick); 3683return TimeSpan.FromTicks((long)(((double)timeSpan.Ticks) / factor + 0.5)); 3701return TimeSpan.FromTicks((long)(factor * (double)timeSpan.Ticks + 0.5));
Core\CSharp\System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (1)
789TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (1)
789TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (1)
789TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (1)
789TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (1)
789TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (1)
881TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);
Core\CSharp\System\Windows\Media\Animation\TimeIntervalCollection.cs (26)
1108projection.InitializePoint(TimeSpan.FromTicks(outputInTicks)); 1276projection.CurrentNodeTime = TimeSpan.FromTicks((long)(speedRatio * timeOffset)); 1294projection.CurrentNodeTime = TimeSpan.FromTicks((long)(speedRatio * timeOffset)); 1383projection.MergePoint(TimeSpan.FromTicks(currentProjection)); 1449TimeSpan.FromTicks(currentProjection), includeTime); 1454projection.MergeInterval(TimeSpan.FromTicks(currentProjection), includeTime, 1455TimeSpan.FromTicks(periodInTicks), true); 1466TimeSpan.FromTicks(clippedTime), NextNodeIsPoint); 1473projection.MergeInterval(TimeSpan.FromTicks(clippedTime), NextNodeIsPoint, 1474TimeSpan.FromTicks(periodInTicks), true); 1485projection.MergeInterval(TimeSpan.FromTicks(currentProjection - intervalLength), NextNodeIsPoint, 1486TimeSpan.FromTicks(currentProjection), CurrentNodeIsPoint); 1490projection.MergeInterval(TimeSpan.FromTicks(currentProjection), CurrentNodeIsPoint, 1491TimeSpan.FromTicks(currentProjection + intervalLength), NextNodeIsPoint); 1511projection._nodeTime[1] = TimeSpan.FromTicks(periodInTicks); 1521projection.MergeInterval(TimeSpan.FromTicks(currentProjection), CurrentNodeIsPoint, 1522TimeSpan.FromTicks(periodInTicks), false); 1526TimeSpan.FromTicks(intervalLength - timeBeforeNextPeriod), NextNodeIsPoint); 1532projection.MergePoint(TimeSpan.FromTicks(periodInTicks)); 1544projection.MergeInterval(TimeSpan.FromTicks(currentProjection), CurrentNodeIsPoint, 1545TimeSpan.FromTicks(currentProjection + intervalLength), NextNodeIsPoint); 1829TimeSpan accelEnd = TimeSpan.FromTicks((long)(dpPeriod * accelRatio)); 1830TimeSpan decelStart = TimeSpan.FromTicks(periodInTicks - (long)(dpPeriod * decelRatio)); 1840_nodeTime[_current] = TimeSpan.FromTicks((long)(halfMaxRate * inversePeriod * t * t / accelRatio)); 1848_nodeTime[_current] = TimeSpan.FromTicks((long)(halfMaxRate * (2 * t - (accelRatio * dpPeriod)))); 1856_nodeTime[_current] = TimeSpan.FromTicks(periodInTicks - (long)(halfMaxRate * inversePeriod * t * t / decelRatio));
Core\CSharp\System\Windows\Media\Animation\TimeManager.cs (3)
466return TimeSpan.FromTicks(DateTime.Now.Ticks); 805return TimeSpan.FromTicks(-1); 811return TimeSpan.FromTicks(-1);
Core\CSharp\System\Windows\Media\MediaClock.cs (1)
112_mediaPlayer.SetPosition(TimeSpan.FromTicks(0));
Core\CSharp\System\Windows\Media\MediaContext.cs (7)
219_estimatedNextPresentationTime = TimeSpan.FromTicks(CountsToTicks(_lastPresentationTime)); 610nextTickNeeded = TimeSpan.FromTicks(Math.Max(nextTickNeeded.Ticks, minimumDelay.Ticks)); 705_estimatedNextVSyncTimer.Interval = TimeSpan.FromTicks(earliestWakeupTicks - currentTicks); 1213_estimatedNextPresentationTime = TimeSpan.FromTicks(nextPresentationTicks); 1218_estimatedNextPresentationTime = TimeSpan.FromTicks(countsTicks); 1223_estimatedNextPresentationTime = TimeSpan.FromTicks(countsTicks); 2645timer.Interval = TimeSpan.FromTicks(earliestWakeupTicks - currentTicks);
Core\CSharp\System\Windows\Media\MediaPlayerState.cs (3)
504return new Duration(TimeSpan.FromTicks(mediaLength)); 812Position = TimeSpan.FromTicks(0); 1160return TimeSpan.FromTicks(position);
System (3)
regex\System\Text\RegularExpressions\RegexMatchTimeoutException.cs (3)
38private TimeSpan matchTimeout = TimeSpan.FromTicks(-1); 102TimeSpan timeout = TimeSpan.FromTicks(info.GetInt64("timeoutTicks")); 116Init("", "", TimeSpan.FromTicks(-1));
System.Activities.DurableInstancing (1)
System\Activities\DurableInstancing\SqlCommandAsyncResult.cs (1)
69this.timeoutHelper = new TimeoutHelper(TimeSpan.FromTicks(openTimeout));
System.Data (3)
fx\src\data\System\Data\Common\TimeSpanStorage.cs (3)
76return TimeSpan.FromTicks((long)Math.Round(sum)); 91return TimeSpan.FromTicks((long)Math.Round(meanSum / meanCount)); 120return TimeSpan.FromTicks((long)stDev);
System.Management (1)
ManagementDatetime.cs (1)
394 TimeSpan tsTemp = System.TimeSpan.FromTicks(ticks);
System.Runtime.Serialization (1)
System\Xml\XmlBufferReader.cs (1)
513return TimeSpan.FromTicks(value);
System.ServiceModel (10)
System\ServiceModel\Channels\PeerNodeImplementation.cs (2)
846InternalClose(TimeSpan.FromTicks(0), false); 1269CloseCore(TimeSpan.FromTicks(0), false);
System\ServiceModel\Security\InMemoryNonceCache.cs (1)
60: base(lowWaterMark, maxCachedNonces, comparer, PurgingMode.AccessBasedPurge, TimeSpan.FromTicks(cachingTimeSpan.Ticks >> 2), false)
System\ServiceModel\Security\NegotiationTokenAuthenticatorStateCache.cs (1)
21: base(lowWaterMark, maximumCachedState, null, PurgingMode.TimerBasedPurge, TimeSpan.FromTicks(cachingSpan.Ticks >> 2), true)
System\ServiceModel\Security\SecuritySessionClientSettings.cs (1)
1181TimeSpan tokenValidityInterval = TimeSpan.FromTicks((long)(((token.ValidTo.Ticks - token.ValidFrom.Ticks) * this.settings.issuedTokenRenewalThreshold) / 100));
System\ServiceModel\Security\Tokens\WindowsUserNameCachingSecurityTokenAuthenticator.cs (1)
31: base((maxCachedLogonTokens * lowWaterMarkFactor) / 100, maxCachedLogonTokens, StringComparer.OrdinalIgnoreCase, PurgingMode.TimerBasedPurge, TimeSpan.FromTicks(cachedLogonTokenLifetime.Ticks >> 2), true)
System\ServiceModel\TimeSpanHelper.cs (4)
14TimeSpan value = TimeSpan.FromTicks(TimeSpan.TicksPerMinute * minutes); 20TimeSpan value = TimeSpan.FromTicks(TimeSpan.TicksPerSecond * seconds); 26TimeSpan value = TimeSpan.FromTicks(TimeSpan.TicksPerMillisecond * ms); 32TimeSpan value = TimeSpan.FromTicks(TimeSpan.TicksPerDay * days);
System.ServiceModel.Internals (1)
System\Runtime\BackoffTimeoutHelper.cs (1)
117waitTime = TimeSpan.FromTicks(waitTime.Ticks * 2);
System.Web (1)
HttpContext.cs (1)
1647return TimeSpan.FromTicks(ticks);