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

◆ CreateTimer()

override Timer System.Net.TimerThread.TimerQueue.CreateTimer ( Callback callback,
object context )
inlinepackage

Definition at line 74 of file TimerThread.cs.

75 {
76 TimerNode timerNode = new TimerNode(callback, context, base.Duration, _timers);
77 bool flag = false;
79 {
80 if (_timers.Next == _timers)
81 {
82 if (_thisHandle == IntPtr.Zero)
83 {
85 }
86 flag = true;
87 }
88 timerNode.Next = _timers;
89 timerNode.Prev = _timers.Prev;
90 _timers.Prev.Next = timerNode;
91 _timers.Prev = timerNode;
92 }
93 if (flag)
94 {
95 Prod();
96 }
97 return timerNode;
98 }
static GCHandle Alloc(object? value)
Definition GCHandle.cs:81

References System.Net.TimerThread.TimerQueue._thisHandle, System.Net.TimerThread.TimerQueue._timers, System.Runtime.InteropServices.GCHandle.Alloc(), System.Net.TimerThread.TimerNode.Next, System.Net.TimerThread.TimerNode.Prev, System.Net.TimerThread.Prod(), and System.IntPtr.Zero.