64 references to Ticks
dotnet-svcutil-lib (1)
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\SqlUtils.cs (1)
1093return (int)(dt.Ticks - new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, dt.Second).Ticks);
Microsoft.AspNetCore.Authentication (1)
SystemClock.cs (1)
37var utcNowPrecisionSeconds = new DateTime((_timeProvider.GetUtcNow().Ticks / TimeSpan.TicksPerSecond) * TimeSpan.TicksPerSecond, DateTimeKind.Utc);
Microsoft.AspNetCore.Http.Results (1)
src\Shared\ResultsHelpers\FileResultHelper.cs (1)
392var ticksToRemove = dateTimeOffset.Ticks % TimeSpan.TicksPerSecond;
Microsoft.AspNetCore.Identity (1)
TimeProviderClock.cs (1)
29var utcNowPrecisionSeconds = new DateTime((_timeProvider.GetUtcNow().Ticks / TimeSpan.TicksPerSecond) * TimeSpan.TicksPerSecond, DateTimeKind.Utc);
Microsoft.AspNetCore.Mvc.Core (1)
src\Shared\ResultsHelpers\FileResultHelper.cs (1)
392var ticksToRemove = dateTimeOffset.Ticks % TimeSpan.TicksPerSecond;
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheEntryFormatter.cs (1)
129writer.Write7BitEncodedInt64(entry.Created.Ticks);
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheStore.cs (1)
35private long _lastConnectTicks = DateTimeOffset.UtcNow.Ticks;
Microsoft.Extensions.Caching.StackExchangeRedis (2)
RedisCache.cs (2)
52private long _lastConnectTicks = DateTimeOffset.UtcNow.Ticks; 251new HashEntry(AbsoluteExpirationKey, absoluteExpiration?.Ticks ?? NotPresent),
Microsoft.Extensions.Diagnostics.ResourceMonitoring (13)
Snapshot.cs (1)
82TotalTimeSinceStart = TimeSpan.FromTicks(timeProvider.GetUtcNow().Ticks);
Windows\Disk\WindowsDiskIoRatePerfCounter.cs (2)
57_lastTimeTicks = _timeProvider.GetUtcNow().Ticks; 62long currentTimeTicks = _timeProvider.GetUtcNow().Ticks;
Windows\Disk\WindowsDiskIoTimePerfCounter.cs (2)
55_lastTimeTicks = _timeProvider.GetUtcNow().Ticks; 60long currentTimeTicks = _timeProvider.GetUtcNow().Ticks;
Windows\WindowsContainerSnapshotProvider.cs (4)
108_oldCpuTimeTicks = _timeProvider.GetUtcNow().Ticks; 161TimeSpan.FromTicks(_timeProvider.GetUtcNow().Ticks), 300var timeTickDelta = (now.Ticks - _oldCpuTimeTicks) * _cpuLimit; 310_oldCpuTimeTicks = now.Ticks;
Windows\WindowsSnapshotProvider.cs (4)
81_oldCpuTimeTicks = timeProvider.GetUtcNow().Ticks; 110totalTimeSinceStart: TimeSpan.FromTicks(_timeProvider.GetUtcNow().Ticks), 187var timeTickDelta = (now.Ticks - _oldCpuTimeTicks) * _cpuUnits; 196_oldCpuTimeTicks = now.Ticks;
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (23)
CalculatorTests.cs (2)
19totalTimeSinceStart: TimeSpan.FromTicks(new FakeTimeProvider().GetUtcNow().Ticks), 122totalTimeSinceStart: TimeSpan.FromTicks(new FakeTimeProvider().GetUtcNow().Ticks),
Helpers\DummyProvider.cs (1)
28totalTimeSinceStart: TimeSpan.FromTicks(SnapshotTimeClock.GetUtcNow().Ticks),
IResourceUtilizationSnapshotProviderTests.cs (1)
27Assert.Equal(DummyProvider.SnapshotTimeClock.GetUtcNow().Ticks, snapshot.TotalTimeSinceStart.Ticks);
Providers\ConditionallyFaultProvider.cs (1)
35TimeSpan.FromTicks(new FakeTimeProvider().GetUtcNow().Ticks),
Providers\FakeProvider.cs (1)
12TimeSpan.FromTicks(new FakeTimeProvider().GetUtcNow().Ticks),
Providers\FaultProvider.cs (1)
25return new Snapshot(TimeSpan.FromTicks(_clock.GetUtcNow().Ticks), TimeSpan.Zero, TimeSpan.Zero, ulong.MaxValue);
ResourceMonitoringServiceTests.cs (13)
388TimeSpan.FromTicks(clock.GetUtcNow().Ticks), 402TimeSpan.FromTicks(clock.GetUtcNow().AddMilliseconds(TimerPeriod).Ticks), 407TimeSpan.FromTicks(clock.GetUtcNow().AddMilliseconds(TimerPeriod * 2).Ticks), 412TimeSpan.FromTicks(clock.GetUtcNow().AddMilliseconds(TimerPeriod * 3).Ticks), 417TimeSpan.FromTicks(clock.GetUtcNow().AddMilliseconds(TimerPeriod * 4).Ticks), 422TimeSpan.FromTicks(clock.GetUtcNow().AddMilliseconds(TimerPeriod * 5).Ticks), 495TimeSpan.FromTicks(clock.GetUtcNow().Ticks), 508TimeSpan.FromTicks(clock.GetUtcNow().AddMilliseconds(TimerPeriod).Ticks), 513TimeSpan.FromTicks(clock.GetUtcNow().AddMilliseconds(TimerPeriod * 2).Ticks), 518TimeSpan.FromTicks(clock.GetUtcNow().AddMilliseconds(TimerPeriod * 3).Ticks), 523TimeSpan.FromTicks(clock.GetUtcNow().AddMilliseconds(TimerPeriod * 4).Ticks), 528TimeSpan.FromTicks(clock.GetUtcNow().AddMilliseconds(TimerPeriod * 5).Ticks), 643TimeSpan.FromTicks(_clock.GetUtcNow().Ticks),
SnapshotTests.cs (3)
18var snapshot = new Snapshot(TimeSpan.FromTicks(time.GetUtcNow().Ticks), TimeSpan.Zero, TimeSpan.FromSeconds(1), 10); 19Assert.Equal(time.GetUtcNow().Ticks, snapshot.TotalTimeSinceStart.Ticks); 23Assert.Equal(time.GetUtcNow().Ticks, snapshot.TotalTimeSinceStart.Ticks);
Microsoft.Extensions.TimeProvider.Testing (7)
FakeTimeProvider.cs (7)
45_ = Throw.IfLessThan(startDateTime.Ticks, 0); 176return GetUtcNow().Ticks; 222waiter.ScheduledOn = _now.Ticks; 223waiter.WakeupTime = _now.Ticks + dueTime; 248if (waiter.WakeupTime > _now.Ticks) 282var oldTicks = _now.Ticks; 287var newTicks = _now.Ticks;
System.ComponentModel.TypeConverter (2)
System\ComponentModel\DateTimeOffsetConverter.cs (2)
134if (dto.Ticks == 0) 139new object[] { dto.Ticks }
System.Formats.Asn1 (1)
System\Formats\Asn1\AsnWriter.GeneralizedTime.cs (1)
74long floatingTicks = normalized.Ticks % TimeSpan.TicksPerSecond;
System.Private.CoreLib (3)
src\libraries\Common\src\System\TimeProvider.cs (1)
65long localTicks = utcDateTime.Ticks + offset.Ticks;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\SimpleTypeInfos.cs (1)
251long ticks = dateTimeOffset.Ticks;
src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.Unix.cs (1)
585return (time.UtcDateTime.Ticks - DateTimeOffset.UnixEpoch.Ticks - seconds * TimeSpan.TicksPerSecond) * NanosecondsPerTick;
System.Private.Windows.Core (2)
System\Value.cs (1)
491_union.Ticks = value.Ticks;
System\Value.PackedDateTimeOffset.cs (1)
46ulong ticks = (ulong)dateTime.Ticks;
System.Private.Xml (3)
System\Xml\BinaryXml\SqlUtils.cs (1)
780return (int)(dt.Ticks - new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, dt.Second).Ticks);
System\Xml\Serialization\CodeGenerator.cs (1)
862Ldc(((DateTimeOffset)o).Ticks); // ticks
System\Xml\Serialization\XmlSerializationWriter.cs (1)
4353Writer.Write(((DateTimeOffset)value).Ticks.ToString(CultureInfo.InvariantCulture));
System.Security.Cryptography (1)
System\Security\Cryptography\X509Certificates\Asn1\TimeAsn.xml.cs (1)
105if (decoded.GeneralTime!.Value.Ticks % TimeSpan.TicksPerSecond != 0)