3 writes to _ticks
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (3)
241
_ticks
= ticks;
246
_ticks
= TimeToTicks(hours, minutes, seconds);
305
_ticks
= totalMicroseconds * TicksPerMicrosecond;
49 references to _ticks
System.Private.CoreLib (49)
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (4)
862
return AddTicks(value.
_ticks
);
1657
ulong ticks = (ulong)(Ticks - value.
_ticks
);
1857
ulong ticks = (ulong)(d.Ticks + t.
_ticks
);
1864
ulong ticks = (ulong)(d.Ticks - t.
_ticks
);
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (1)
371
public static TimeOnly FromTimeSpan(TimeSpan timeSpan) => new TimeOnly(timeSpan.
_ticks
);
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (44)
308
public long Ticks =>
_ticks
;
310
public int Days => (int)(
_ticks
/ TicksPerDay);
312
public int Hours => (int)(
_ticks
/ TicksPerHour % HoursPerDay);
314
public int Milliseconds => (int)(
_ticks
/ TicksPerMillisecond % MillisecondsPerSecond);
323
public int Microseconds => (int)(
_ticks
/ TicksPerMicrosecond % MicrosecondsPerMillisecond);
332
public int Nanoseconds => (int)(
_ticks
% TicksPerMicrosecond * NanosecondsPerTick);
334
public int Minutes => (int)(
_ticks
/ TicksPerMinute % MinutesPerHour);
336
public int Seconds => (int)(
_ticks
/ TicksPerSecond % SecondsPerMinute);
338
public double TotalDays => (double)
_ticks
/ TicksPerDay;
340
public double TotalHours => (double)
_ticks
/ TicksPerHour;
346
double temp = (double)
_ticks
/ TicksPerMillisecond;
371
public double TotalMicroseconds => (double)
_ticks
/ TicksPerMicrosecond;
383
public double TotalNanoseconds => (double)
_ticks
* NanosecondsPerTick;
385
public double TotalMinutes => (double)
_ticks
/ TicksPerMinute;
387
public double TotalSeconds => (double)
_ticks
/ TicksPerSecond;
394
public static int Compare(TimeSpan t1, TimeSpan t2) => t1.
_ticks
.CompareTo(t2.
_ticks
);
418
if (
_ticks
== MinTicks)
422
return new TimeSpan(
_ticks
>= 0 ?
_ticks
: -
_ticks
);
431
public override int GetHashCode() =>
_ticks
.GetHashCode();
870
if (t.
_ticks
== MinTicks)
874
return new TimeSpan(-t.
_ticks
);
879
long result = t1.
_ticks
- t2.
_ticks
;
880
long t1Sign = t1.
_ticks
>> 63;
882
if ((t1Sign != (t2.
_ticks
>> 63)) && (t1Sign != (result >> 63)))
895
long result = t1.
_ticks
+ t2.
_ticks
;
896
long t1Sign = t1.
_ticks
>> 63;
898
if ((t1Sign == (t2.
_ticks
>> 63)) && (t1Sign != (result >> 63)))
944
public static bool operator ==(TimeSpan t1, TimeSpan t2) => t1.
_ticks
== t2.
_ticks
;
947
public static bool operator !=(TimeSpan t1, TimeSpan t2) => t1.
_ticks
!= t2.
_ticks
;
950
public static bool operator <(TimeSpan t1, TimeSpan t2) => t1.
_ticks
< t2.
_ticks
;
953
public static bool operator <=(TimeSpan t1, TimeSpan t2) => t1.
_ticks
<= t2.
_ticks
;
956
public static bool operator >(TimeSpan t1, TimeSpan t2) => t1.
_ticks
> t2.
_ticks
;
959
public static bool operator >=(TimeSpan t1, TimeSpan t2) => t1.
_ticks
>= t2.
_ticks
;