The R Project SVN R

Rev

Rev 44637 | Rev 45446 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 44637 Rev 45074
Line 121... Line 121...
121
       concurrency support. LT */
121
       concurrency support. LT */
122
#if  ( defined(HAVE_AQUA) || defined(Win32) )
122
#if  ( defined(HAVE_AQUA) || defined(Win32) )
123
    R_ProcessEvents();
123
    R_ProcessEvents();
124
#else
124
#else
125
    R_PolledEvents();
125
    R_PolledEvents();
-
 
126
    /* the same code is in R_ProcessEvents on Windows */
-
 
127
    if (cpuLimit > 0.0 || elapsedLimit > 0.0) {
-
 
128
	double cpu, data[5];
-
 
129
	R_getProcTime(data);
-
 
130
	cpu = data[0] + data[1] + data[3] + data[4];
-
 
131
	if (elapsedLimit > 0.0 && data[2] > elapsedLimit) {
-
 
132
	    cpuLimit = elapsedLimit = -1;
-
 
133
	    if (elapsedLimit2 > 0.0 && data[2] > elapsedLimit2) {
-
 
134
		elapsedLimit2 = -1.0;
-
 
135
		error(_("reached session elapsed time limit"));
-
 
136
	    } else
-
 
137
		error(_("reached elapsed time limit"));
-
 
138
	}
-
 
139
	if (cpuLimit > 0.0 && cpu > cpuLimit) {
-
 
140
	    cpuLimit = elapsedLimit = -1;
-
 
141
	    if (cpuLimit2 > 0.0 && cpu > cpuLimit2) {
-
 
142
		cpuLimit2 = -1.0;
-
 
143
		error(_("reached session CPU time limit"));
-
 
144
	    } else
-
 
145
		error(_("reached CPU time limit"));
-
 
146
	}
-
 
147
    }
126
    if (R_interrupts_pending)
148
    if (R_interrupts_pending)
127
	onintr();
149
	onintr();
128
#endif /* Win32 */
150
#endif /* Aqua or Win32 */
129
}
151
}
130
 
152
 
131
void onintr()
153
void onintr()
132
{
154
{
133
    if (R_interrupts_suspended) {
155
    if (R_interrupts_suspended) {