31 references to TicksPerMicrosecond
Aspire.Dashboard (2)
Otlp\Model\DurationFormatter.cs (2)
26new UnitStep { Unit = "μs", Ticks = TimeSpan.TicksPerMicrosecond, Threshold = TimeSpan.TicksPerMicrosecond, IsDecimal = true },
Aspire.Dashboard.Tests (3)
DurationFormatterTests.cs (3)
32Assert.Equal("1μs", DurationFormatter.FormatDuration(TimeSpan.FromTicks(1 * TimeSpan.TicksPerMicrosecond))); 52var input = 2 * TimeSpan.TicksPerMillisecond + 357 * TimeSpan.TicksPerMicrosecond; 94var input = (double)TimeSpan.TicksPerMicrosecond / 10;
System.Private.CoreLib (26)
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (7)
79private const long MaxMicroseconds = MaxTicks / TimeSpan.TicksPerMicrosecond; 680_dateData += (uint)microsecond * (uint)TimeSpan.TicksPerMicrosecond; 809_dateData += (uint)microsecond * (uint)TimeSpan.TicksPerMicrosecond; 932public DateTime AddMicroseconds(double value) => AddUnits(value, MaxMicroseconds, TimeSpan.TicksPerMicrosecond); 1141ticks += (uint)microsecond * (uint)TimeSpan.TicksPerMicrosecond; 1477public int Microsecond => (int)((UTicks / TimeSpan.TicksPerMicrosecond) % 1000); 1482public int Nanosecond => (int)(UTicks % TimeSpan.TicksPerMicrosecond) * 100;
src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (2)
255_dateTime = DateTime.CreateUnchecked(UtcTicks + (uint)microsecond * (uint)TimeSpan.TicksPerMicrosecond); 329_dateTime = DateTime.CreateUnchecked(UtcTicks + (uint)microsecond * (uint)TimeSpan.TicksPerMicrosecond);
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (2)
116public int Microsecond => (int)(_ticks / TimeSpan.TicksPerMicrosecond % (uint)TimeSpan.MicrosecondsPerMillisecond); 121public int Nanosecond => (int)(_ticks % TimeSpan.TicksPerMicrosecond * TimeSpan.NanosecondsPerTick);
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (15)
53public const long TicksPerMillisecond = TicksPerMicrosecond * 1000; // 10,000 93public const long MicrosecondsPerMillisecond = TicksPerMillisecond / TicksPerMicrosecond; // 1,000 101public const long MicrosecondsPerSecond = TicksPerSecond / TicksPerMicrosecond; // 1,000,000 109public const long MicrosecondsPerMinute = TicksPerMinute / TicksPerMicrosecond; // 60,000,000 117public const long MicrosecondsPerHour = TicksPerHour / TicksPerMicrosecond; // 3,600,000,000 125public const long MicrosecondsPerDay = TicksPerDay / TicksPerMicrosecond; // 86,400,000,000 210internal const long MinMicroseconds = MinTicks / TicksPerMicrosecond; // - 922,337,203,685,477,580 211internal const long MaxMicroseconds = MaxTicks / TicksPerMicrosecond; // + 922,337,203,685,477,580 305_ticks = totalMicroseconds * TicksPerMicrosecond; 323public int Microseconds => (int)(_ticks / TicksPerMicrosecond % MicrosecondsPerMillisecond); 332public int Nanoseconds => (int)(_ticks % TicksPerMicrosecond * NanosecondsPerTick); 371public double TotalMicroseconds => (double)_ticks / TicksPerMicrosecond; 619long ticks = (long)microseconds * TicksPerMicrosecond; 632public static TimeSpan FromMicroseconds(long microseconds) => FromUnits(microseconds, TicksPerMicrosecond, MinMicroseconds, MaxMicroseconds); 679public static TimeSpan FromMicroseconds(double value) => Interval(value, TicksPerMicrosecond);