MCPcopy Create free account
hub / github.com/SimHacker/micropolis / SelTimeoutProc

Function SelTimeoutProc

micropolis-activity/src/tk/tkselect.c:1749–1781  ·  view source on GitHub ↗
(clientData)

Source from the content-addressed store, hash-verified

1747 * SelTimeoutProc --
1748 *
1749 * This procedure is invoked once every second while waiting for
1750 * the selection to be returned. After a while it gives up and
1751 * aborts the selection retrieval.
1752 *
1753 * Results:
1754 * None.
1755 *
1756 * Side effects:
1757 * A new timer callback is created to call us again in another
1758 * second, unless time has expired, in which case an error is
1759 * recorded for the retrieval.
1760 *
1761 *----------------------------------------------------------------------
1762 */
1763
1764static void
1765SelTimeoutProc(clientData)
1766 ClientData clientData; /* Information about retrieval
1767 * in progress. */
1768{
1769 register RetrievalInfo *retrPtr = (RetrievalInfo *) clientData;
1770
1771 /*
1772 * Make sure that the retrieval is still in progress. Then
1773 * see how long it's been since any sort of response was received
1774 * from the other side.
1775 */
1776
1777 if (retrPtr->result != -1) {
1778 return;
1779 }
1780 retrPtr->idleTime++;
1781 if (retrPtr->idleTime >= 5) {
1782
1783 /*
1784 * Use a careful procedure to store the error message, because

Callers

nothing calls this directly

Calls 2

Tcl_SetResultFunction · 0.85
Tk_CreateTimerHandlerFunction · 0.70

Tested by

no test coverage detected