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

◆ Timer() [5/6]

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

Definition at line 95 of file Timer.cs.

96 {
97 if (dueTime < -1)
98 {
99 throw new ArgumentOutOfRangeException("dueTime", SR.ArgumentOutOfRange_NeedNonNegOrNegative1);
100 }
101 if (period < -1)
102 {
103 throw new ArgumentOutOfRangeException("period", SR.ArgumentOutOfRange_NeedNonNegOrNegative1);
104 }
105 if (dueTime > 4294967294u)
106 {
107 throw new ArgumentOutOfRangeException("dueTime", SR.ArgumentOutOfRange_TimeoutTooLarge);
108 }
109 if (period > 4294967294u)
110 {
111 throw new ArgumentOutOfRangeException("period", SR.ArgumentOutOfRange_PeriodTooLarge);
112 }
113 TimerSetup(callback, state, (uint)dueTime, (uint)period);
114 }
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().