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