MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / CheckTimeout

Method CheckTimeout

src/Platform/MessageBox.cpp:152–169  ·  view source on GitHub ↗

Check if the head message box should be timed out, returning true if we timed it out static*/

Source from the content-addressed store, hash-verified

150
151// Check if the head message box should be timed out, returning true if we timed it out
152/*static*/ bool MessageBox::CheckTimeout() noexcept
153{
154 if (mboxList != nullptr)
155 {
156 WriteLocker locker(mboxLock);
157
158 MessageBox *mb = mboxList;
159 if (mb != nullptr && mb->timeout != 0 && millis() - startTime >= mb->timeout)
160 {
161 mboxList = mb->next;
162 mb->TimeOut();
163 startTime = millis(); // restart the timeout for the next message box (if any) in the list
164 return true;
165 }
166 }
167
168 return false;
169}
170
171// Time out and delete this message box
172void MessageBox::TimeOut() noexcept

Callers

nothing calls this directly

Calls 1

TimeOutMethod · 0.80

Tested by

no test coverage detected