Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TimeToTicks()

static long System.Globalization.GregorianCalendarHelper.TimeToTicks ( int hour,
int minute,
int second,
int millisecond )
inlinestaticpackage

Definition at line 175 of file GregorianCalendarHelper.cs.

176 {
177 if (hour >= 0 && hour < 24 && minute >= 0 && minute < 60 && second >= 0 && second < 60)
178 {
179 if (millisecond < 0 || millisecond >= 1000)
180 {
181 throw new ArgumentOutOfRangeException("millisecond", SR.Format(SR.ArgumentOutOfRange_Range, 0, 999));
182 }
183 return InternalGlobalizationHelper.TimeToTicks(hour, minute, second) + (long)millisecond * 10000L;
184 }
185 throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond);
186 }

References System.SR.ArgumentOutOfRange_BadHourMinuteSecond, System.SR.ArgumentOutOfRange_Range, System.SR.Format(), System.L, and System.Globalization.InternalGlobalizationHelper.TimeToTicks().

Referenced by System.Globalization.GregorianCalendarHelper.ToDateTime().