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

◆ TimerQueueTimer()

System.Threading.TimerQueueTimer.TimerQueueTimer ( TimerCallback timerCallback,
object state,
uint dueTime,
uint period,
bool flowExecutionContext )
inlinepackage

Definition at line 114 of file TimerQueueTimer.cs.

115 {
116 _timerCallback = timerCallback;
117 _state = state;
118 _dueTime = uint.MaxValue;
119 _period = uint.MaxValue;
120 if (flowExecutionContext)
121 {
122 _executionContext = ExecutionContext.Capture();
123 }
124 _associatedTimerQueue = TimerQueue.Instances[Thread.GetCurrentProcessorId() % TimerQueue.Instances.Length];
125 if (dueTime != uint.MaxValue)
126 {
127 Change(dueTime, period);
128 }
129 }
static ? ExecutionContext Capture()
bool Change(uint dueTime, uint period)
readonly ExecutionContext _executionContext
readonly TimerCallback _timerCallback
readonly TimerQueue _associatedTimerQueue
static TimerQueue[] Instances
Definition TimerQueue.cs:57

References System.Threading.TimerQueueTimer._associatedTimerQueue, System.Threading.TimerQueueTimer._dueTime, System.Threading.TimerQueueTimer._executionContext, System.Threading.TimerQueueTimer._period, System.Threading.TimerQueueTimer._state, System.Threading.TimerQueueTimer._timerCallback, System.Threading.ExecutionContext.Capture(), System.Threading.TimerQueueTimer.Change(), System.Threading.Thread.GetCurrentProcessorId(), System.Threading.TimerQueue.Instances, and System.state.