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

◆ Timer() [3/6]

System.Threading.Timer.Timer ( TimerCallback callback,
object? state,
TimeSpan dueTime,
TimeSpan period )
inline

Definition at line 66 of file Timer.cs.

67 {
68 long num = (long)dueTime.TotalMilliseconds;
69 if (num < -1)
70 {
71 throw new ArgumentOutOfRangeException("dueTime", SR.ArgumentOutOfRange_NeedNonNegOrNegative1);
72 }
73 if (num > 4294967294u)
74 {
75 throw new ArgumentOutOfRangeException("dueTime", SR.ArgumentOutOfRange_TimeoutTooLarge);
76 }
77 long num2 = (long)period.TotalMilliseconds;
78 if (num2 < -1)
79 {
80 throw new ArgumentOutOfRangeException("period", SR.ArgumentOutOfRange_NeedNonNegOrNegative1);
81 }
82 if (num2 > 4294967294u)
83 {
84 throw new ArgumentOutOfRangeException("period", SR.ArgumentOutOfRange_PeriodTooLarge);
85 }
86 TimerSetup(callback, state, (uint)num, (uint)num2);
87 }
void TimerSetup(TimerCallback callback, object state, uint dueTime, uint period, bool flowExecutionContext=true)
Definition Timer.cs:122

References System.SR.ArgumentOutOfRange_NeedNonNegOrNegative1, System.SR.ArgumentOutOfRange_PeriodTooLarge, System.SR.ArgumentOutOfRange_TimeoutTooLarge, System.state, and System.Threading.Timer.TimerSetup().