2 writes to _ticks
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (2)
87
_ticks
= (ulong)ticks;
91
internal TimeOnly(ulong ticks) =>
_ticks
= ticks;
35 references to _ticks
System.Private.CoreLib (35)
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (35)
96
public int Hour => (int)(
_ticks
/ TimeSpan.TicksPerHour);
101
public int Minute => (int)((uint)(
_ticks
/ TimeSpan.TicksPerMinute) % (uint)TimeSpan.MinutesPerHour);
106
public int Second => (int)((uint)(
_ticks
/ TimeSpan.TicksPerSecond) % (uint)TimeSpan.SecondsPerMinute);
111
public int Millisecond => (int)((uint)(
_ticks
/ TimeSpan.TicksPerMillisecond) % (uint)TimeSpan.MillisecondsPerSecond);
116
public int Microsecond => (int)(
_ticks
/ TimeSpan.TicksPerMicrosecond % (uint)TimeSpan.MicrosecondsPerMillisecond);
121
public int Nanosecond => (int)(
_ticks
% TimeSpan.TicksPerMicrosecond * TimeSpan.NanosecondsPerTick);
126
public long Ticks => (long)
_ticks
;
128
private TimeOnly AddTicks(long ticks) => new TimeOnly((
_ticks
+ TimeSpan.TicksPerDay + (ulong)(ticks % TimeSpan.TicksPerDay)) % TimeSpan.TicksPerDay);
133
newTicks += (long)
_ticks
;
210
ulong time =
_ticks
;
211
ulong startTicks = start.
_ticks
;
212
ulong endTicks = end.
_ticks
;
226
public static bool operator ==(TimeOnly left, TimeOnly right) => left.
_ticks
== right.
_ticks
;
235
public static bool operator !=(TimeOnly left, TimeOnly right) => left.
_ticks
!= right.
_ticks
;
244
public static bool operator >(TimeOnly left, TimeOnly right) => left.
_ticks
> right.
_ticks
;
253
public static bool operator >=(TimeOnly left, TimeOnly right) => left.
_ticks
>= right.
_ticks
;
262
public static bool operator <(TimeOnly left, TimeOnly right) => left.
_ticks
< right.
_ticks
;
271
public static bool operator <=(TimeOnly left, TimeOnly right) => left.
_ticks
<= right.
_ticks
;
281
long diff = (long)(t1.
_ticks
- t2.
_ticks
);
384
public TimeSpan ToTimeSpan() => new TimeSpan((long)
_ticks
);
386
internal DateTime ToDateTime() => DateTime.CreateUnchecked((long)
_ticks
);
398
public int CompareTo(TimeOnly value) =>
_ticks
.CompareTo(value.
_ticks
);
426
public bool Equals(TimeOnly value) =>
_ticks
== value.
_ticks
;
433
public override bool Equals([NotNullWhen(true)] object? value) => value is TimeOnly timeOnly &&
_ticks
== timeOnly.
_ticks
;
441
ulong ticks =
_ticks
;