kernel/qtimerinfo_unix.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6 -
7 -
8 -
9 -
10 -
11__attribute__((visibility("default"))) bool qt_disable_lowpriority_timers=false; -
12 -
13 -
14 -
15 -
16 -
17 -
18QTimerInfoList::QTimerInfoList() -
19{ -
20 -
21 if (!QElapsedTimer::isMonotonic()) {
partially evaluated: !QElapsedTimer::isMonotonic()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1731378
0-1731378
22 -
23 previousTime = qt_gettime(); -
24 -
25 tms unused; -
26 previousTicks = times(&unused); -
27 -
28 ticksPerSecond = sysconf(_SC_CLK_TCK); -
29 msPerTick = 1000/ticksPerSecond; -
30 } else {
never executed: }
0
31 -
32 previousTime.tv_sec = previousTime.tv_usec = 0; -
33 previousTicks = 0; -
34 ticksPerSecond = 0; -
35 msPerTick = 0; -
36 }
executed: }
Execution Count:1731378
1731378
37 -
38 -
39 firstTimerInfo = 0; -
40}
executed: }
Execution Count:1731378
1731378
41 -
42timeval QTimerInfoList::updateCurrentTime() -
43{ -
44 return (currentTime = qt_gettime());
executed: return (currentTime = qt_gettime());
Execution Count:1070185
1070185
45} -
46 -
47 -
48 -
49template <> -
50timeval qAbs(const timeval &t) -
51{ -
52 timeval tmp = t; -
53 if (tmp.tv_sec < 0) {
never evaluated: tmp.tv_sec < 0
0
54 tmp.tv_sec = -tmp.tv_sec - 1; -
55 tmp.tv_usec -= 1000000; -
56 }
never executed: }
0
57 if (tmp.tv_sec == 0 && tmp.tv_usec < 0) {
never evaluated: tmp.tv_sec == 0
never evaluated: tmp.tv_usec < 0
0
58 tmp.tv_usec = -tmp.tv_usec; -
59 }
never executed: }
0
60 return normalizedTimeval(tmp);
never executed: return normalizedTimeval(tmp);
0
61} -
62bool QTimerInfoList::timeChanged(timeval *delta) -
63{ -
64 -
65 -
66 -
67 -
68 struct tms unused; -
69 clock_t currentTicks = times(&unused); -
70 -
71 clock_t elapsedTicks = currentTicks - previousTicks; -
72 timeval elapsedTime = currentTime - previousTime; -
73 -
74 timeval elapsedTimeTicks; -
75 elapsedTimeTicks.tv_sec = elapsedTicks / ticksPerSecond; -
76 elapsedTimeTicks.tv_usec = (((elapsedTicks * 1000) / ticksPerSecond) % 1000) * 1000; -
77 -
78 timeval dummy; -
79 if (!delta)
never evaluated: !delta
0
80 delta = &dummy;
never executed: delta = &dummy;
0
81 *delta = elapsedTime - elapsedTimeTicks; -
82 -
83 previousTicks = currentTicks; -
84 previousTime = currentTime; -
85 -
86 -
87 -
88 timeval tickGranularity; -
89 tickGranularity.tv_sec = 0; -
90 tickGranularity.tv_usec = msPerTick * 1000; -
91 return elapsedTimeTicks < ((qAbs(*delta) - tickGranularity) * 10);
never executed: return elapsedTimeTicks < ((qAbs(*delta) - tickGranularity) * 10);
0
92} -
93 -
94 -
95 -
96 -
97void QTimerInfoList::timerRepair(const timeval &diff) -
98{ -
99 -
100 for (int i = 0; i < size(); ++i) {
never evaluated: i < size()
0
101 register QTimerInfo *t = at(i); -
102 t->timeout = t->timeout + diff; -
103 }
never executed: }
0
104}
never executed: }
0
105 -
106void QTimerInfoList::repairTimersIfNeeded() -
107{ -
108 if (QElapsedTimer::isMonotonic())
partially evaluated: QElapsedTimer::isMonotonic()
TRUEFALSE
yes
Evaluation Count:669325
no
Evaluation Count:0
0-669325
109 return;
executed: return;
Execution Count:669327
669327
110 timeval delta; -
111 if (timeChanged(&delta))
never evaluated: timeChanged(&delta)
0
112 timerRepair(delta);
never executed: timerRepair(delta);
0
113}
never executed: }
0
114void QTimerInfoList::timerInsert(QTimerInfo *ti) -
115{ -
116 int index = size(); -
117 while (index--) {
evaluated: index--
TRUEFALSE
yes
Evaluation Count:292930
yes
Evaluation Count:59268
59268-292930
118 register const QTimerInfo * const t = at(index); -
119 if (!(ti->timeout < t->timeout))
evaluated: !(ti->timeout < t->timeout)
TRUEFALSE
yes
Evaluation Count:108095
yes
Evaluation Count:184835
108095-184835
120 break;
executed: break;
Execution Count:108095
108095
121 }
executed: }
Execution Count:184835
184835
122 insert(index+1, ti); -
123}
executed: }
Execution Count:167363
167363
124 -
125inline timeval &operator+=(timeval &t1, int ms) -
126{ -
127 t1.tv_sec += ms / 1000; -
128 t1.tv_usec += ms % 1000 * 1000; -
129 return normalizedTimeval(t1);
executed: return normalizedTimeval(t1);
Execution Count:202805
202805
130} -
131 -
132inline timeval operator+(const timeval &t1, int ms) -
133{ -
134 timeval t2 = t1; -
135 return t2 += ms;
executed: return t2 += ms;
Execution Count:126699
126699
136} -
137 -
138static timeval roundToMillisecond(timeval val) -
139{ -
140 -
141 -
142 -
143 int us = val.tv_usec % 1000; -
144 val.tv_usec += 1000 - us; -
145 return normalizedTimeval(val);
executed: return normalizedTimeval(val);
Execution Count:274966
274966
146} -
147static void calculateCoarseTimerTimeout(QTimerInfo *t, timeval currentTime) -
148{ -
149 register uint interval = uint(t->interval); -
150 register uint msec = uint(t->timeout.tv_usec) / 1000; -
151 qt_noop(); -
152 -
153 -
154 uint absMaxRounding = interval / 20; -
155 -
156 if (interval < 100 && interval != 25 && interval != 50 && interval != 75) {
evaluated: interval < 100
TRUEFALSE
yes
Evaluation Count:1356
yes
Evaluation Count:4872
partially evaluated: interval != 25
TRUEFALSE
yes
Evaluation Count:1356
no
Evaluation Count:0
evaluated: interval != 50
TRUEFALSE
yes
Evaluation Count:1348
yes
Evaluation Count:8
partially evaluated: interval != 75
TRUEFALSE
yes
Evaluation Count:1348
no
Evaluation Count:0
0-4872
157 -
158 if (interval < 50) {
evaluated: interval < 50
TRUEFALSE
yes
Evaluation Count:1331
yes
Evaluation Count:17
17-1331
159 -
160 -
161 register bool roundUp = (msec % 50) >= 25; -
162 msec >>= 1; -
163 msec |= uint(roundUp); -
164 msec <<= 1; -
165 } else {
executed: }
Execution Count:1331
1331
166 -
167 -
168 register bool roundUp = (msec % 100) >= 50; -
169 msec >>= 2; -
170 msec |= uint(roundUp); -
171 msec <<= 2; -
172 }
executed: }
Execution Count:17
17
173 } else { -
174 uint min = qMax<int>(0, msec - absMaxRounding); -
175 uint max = qMin(1000u, msec + absMaxRounding); -
176 -
177 -
178 -
179 -
180 if (min == 0) {
evaluated: min == 0
TRUEFALSE
yes
Evaluation Count:1065
yes
Evaluation Count:3815
1065-3815
181 msec = 0; -
182 goto recalculate;
executed: goto recalculate;
Execution Count:1065
1065
183 } else if (max == 1000) {
evaluated: max == 1000
TRUEFALSE
yes
Evaluation Count:366
yes
Evaluation Count:3449
366-3449
184 msec = 1000; -
185 goto recalculate;
executed: goto recalculate;
Execution Count:366
366
186 } -
187 -
188 uint wantedBoundaryMultiple; -
189 -
190 -
191 -
192 -
193 -
194 if ((interval % 500) == 0) {
evaluated: (interval % 500) == 0
TRUEFALSE
yes
Evaluation Count:2295
yes
Evaluation Count:1154
1154-2295
195 if (interval >= 5000) {
evaluated: interval >= 5000
TRUEFALSE
yes
Evaluation Count:240
yes
Evaluation Count:2055
240-2055
196 msec = msec >= 500 ? max : min;
evaluated: msec >= 500
TRUEFALSE
yes
Evaluation Count:110
yes
Evaluation Count:130
110-130
197 goto recalculate;
executed: goto recalculate;
Execution Count:240
240
198 } else { -
199 wantedBoundaryMultiple = 500; -
200 }
executed: }
Execution Count:2055
2055
201 } else if ((interval % 50) == 0) {
evaluated: (interval % 50) == 0
TRUEFALSE
yes
Evaluation Count:1146
yes
Evaluation Count:8
8-1146
202 -
203 uint mult50 = interval / 50; -
204 if ((mult50 % 4) == 0) {
evaluated: (mult50 % 4) == 0
TRUEFALSE
yes
Evaluation Count:366
yes
Evaluation Count:780
366-780
205 -
206 wantedBoundaryMultiple = 200; -
207 } else if ((mult50 % 2) == 0) {
evaluated: (mult50 % 2) == 0
TRUEFALSE
yes
Evaluation Count:721
yes
Evaluation Count:59
executed: }
Execution Count:366
59-721
208 -
209 wantedBoundaryMultiple = 100; -
210 } else if ((mult50 % 5) == 0) {
evaluated: (mult50 % 5) == 0
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:54
executed: }
Execution Count:721
5-721
211 -
212 wantedBoundaryMultiple = 250; -
213 } else {
executed: }
Execution Count:5
5
214 -
215 wantedBoundaryMultiple = 50; -
216 }
executed: }
Execution Count:54
54
217 } else { -
218 wantedBoundaryMultiple = 25; -
219 }
executed: }
Execution Count:8
8
220 -
221 uint base = msec / wantedBoundaryMultiple * wantedBoundaryMultiple; -
222 uint middlepoint = base + wantedBoundaryMultiple / 2; -
223 if (msec < middlepoint)
evaluated: msec < middlepoint
TRUEFALSE
yes
Evaluation Count:2154
yes
Evaluation Count:1055
1055-2154
224 msec = qMax(base, min);
executed: msec = qMax(base, min);
Execution Count:2154
2154
225 else -
226 msec = qMin(base + wantedBoundaryMultiple, max);
executed: msec = qMin(base + wantedBoundaryMultiple, max);
Execution Count:1055
1055
227 } -
228 -
229recalculate:
code before this statement executed: recalculate:
Execution Count:4557
4557
230 if (msec == 1000u) {
evaluated: msec == 1000u
TRUEFALSE
yes
Evaluation Count:366
yes
Evaluation Count:5862
366-5862
231 ++t->timeout.tv_sec; -
232 t->timeout.tv_usec = 0; -
233 } else {
executed: }
Execution Count:366
366
234 t->timeout.tv_usec = msec * 1000; -
235 }
executed: }
Execution Count:5862
5862
236 -
237 if (t->timeout < currentTime)
partially evaluated: t->timeout < currentTime
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6228
0-6228
238 t->timeout += interval;
never executed: t->timeout += interval;
0
239}
executed: }
Execution Count:6228
6228
240 -
241static void calculateNextTimeout(QTimerInfo *t, timeval currentTime) -
242{ -
243 switch (t->timerType) { -
244 case Qt::PreciseTimer: -
245 case Qt::CoarseTimer: -
246 t->timeout += t->interval; -
247 if (t->timeout < currentTime) {
evaluated: t->timeout < currentTime
TRUEFALSE
yes
Evaluation Count:35552
yes
Evaluation Count:5002
5002-35552
248 t->timeout = currentTime; -
249 t->timeout += t->interval; -
250 }
executed: }
Execution Count:35552
35552
251 -
252 -
253 -
254 -
255 -
256 -
257 -
258 if (t->timerType == Qt::CoarseTimer)
evaluated: t->timerType == Qt::CoarseTimer
TRUEFALSE
yes
Evaluation Count:2180
yes
Evaluation Count:38374
2180-38374
259 calculateCoarseTimerTimeout(t, currentTime);
executed: calculateCoarseTimerTimeout(t, currentTime);
Execution Count:2180
2180
260 return;
executed: return;
Execution Count:40554
40554
261 -
262 case Qt::VeryCoarseTimer: -
263 -
264 t->timeout.tv_sec += t->interval; -
265 if (t->timeout.tv_sec <= currentTime.tv_sec)
partially evaluated: t->timeout.tv_sec <= currentTime.tv_sec
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:110
0-110
266 t->timeout.tv_sec = currentTime.tv_sec + t->interval;
never executed: t->timeout.tv_sec = currentTime.tv_sec + t->interval;
0
267 -
268 -
269 -
270 -
271 -
272 return;
executed: return;
Execution Count:110
110
273 } -
274 -
275 -
276 -
277 -
278 -
279 -
280 -
281}
never executed: }
0
282 -
283 -
284 -
285 -
286 -
287bool QTimerInfoList::timerWait(timeval &tm) -
288{ -
289 timeval currentTime = updateCurrentTime(); -
290 repairTimersIfNeeded(); -
291 -
292 -
293 QTimerInfo *t = 0; -
294 for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) {
evaluated: it != constEnd()
TRUEFALSE
yes
Evaluation Count:312016
yes
Evaluation Count:317780
312016-317780
295 if (!(*it)->activateRef) {
evaluated: !(*it)->activateRef
TRUEFALSE
yes
Evaluation Count:312001
yes
Evaluation Count:15
15-312001
296 t = *it; -
297 break;
executed: break;
Execution Count:312001
312001
298 } -
299 }
executed: }
Execution Count:15
15
300 -
301 if (!t)
evaluated: !t
TRUEFALSE
yes
Evaluation Count:317761
yes
Evaluation Count:312001
312001-317761
302 return false;
executed: return false;
Execution Count:317755
317755
303 -
304 if (currentTime < t->timeout) {
evaluated: currentTime < t->timeout
TRUEFALSE
yes
Evaluation Count:274965
yes
Evaluation Count:37036
37036-274965
305 -
306 tm = roundToMillisecond(t->timeout - currentTime); -
307 } else {
executed: }
Execution Count:274965
274965
308 -
309 tm.tv_sec = 0; -
310 tm.tv_usec = 0; -
311 }
executed: }
Execution Count:37036
37036
312 -
313 return true;
executed: return true;
Execution Count:312001
312001
314} -
315 -
316 -
317 -
318 -
319 -
320 -
321int QTimerInfoList::timerRemainingTime(int timerId) -
322{ -
323 timeval currentTime = updateCurrentTime(); -
324 repairTimersIfNeeded(); -
325 timeval tm = {0, 0}; -
326 -
327 for (int i = 0; i < count(); ++i) {
partially evaluated: i < count()
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
328 register QTimerInfo *t = at(i); -
329 if (t->id == timerId) {
partially evaluated: t->id == timerId
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
330 if (currentTime < t->timeout) {
partially evaluated: currentTime < t->timeout
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
331 -
332 tm = roundToMillisecond(t->timeout - currentTime); -
333 return tm.tv_sec*1000 + tm.tv_usec/1000;
executed: return tm.tv_sec*1000 + tm.tv_usec/1000;
Execution Count:1
1
334 } else { -
335 return 0;
never executed: return 0;
0
336 } -
337 } -
338 }
never executed: }
0
339 -
340 -
341 -
342 -
343 -
344 return -1;
never executed: return -1;
0
345} -
346 -
347void QTimerInfoList::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) -
348{ -
349 QTimerInfo *t = new QTimerInfo; -
350 t->id = timerId; -
351 t->interval = interval; -
352 t->timerType = timerType; -
353 t->obj = object; -
354 t->activateRef = 0; -
355 -
356 timeval expected = updateCurrentTime() + interval; -
357 -
358 switch (timerType) { -
359 case Qt::PreciseTimer: -
360 -
361 -
362 t->timeout = expected; -
363 break;
executed: break;
Execution Count:731
731
364 -
365 case Qt::CoarseTimer: -
366 -
367 -
368 -
369 -
370 if (interval >= 20000) {
evaluated: interval >= 20000
TRUEFALSE
yes
Evaluation Count:4872
yes
Evaluation Count:121095
4872-121095
371 t->timerType = Qt::VeryCoarseTimer; -
372 -
373 } else {
executed: }
Execution Count:4872
4872
374 t->timeout = expected; -
375 if (interval <= 20) {
evaluated: interval <= 20
TRUEFALSE
yes
Evaluation Count:117047
yes
Evaluation Count:4048
4048-117047
376 t->timerType = Qt::PreciseTimer; -
377 -
378 } else if (interval <= 20000) {
partially evaluated: interval <= 20000
TRUEFALSE
yes
Evaluation Count:4048
no
Evaluation Count:0
executed: }
Execution Count:117047
0-117047
379 calculateCoarseTimerTimeout(t, currentTime); -
380 }
executed: }
Execution Count:4048
4048
381 break;
executed: break;
Execution Count:121095
121095
382 } -
383 -
384 case Qt::VeryCoarseTimer:
code before this statement executed: case Qt::VeryCoarseTimer:
Execution Count:4872
4872
385 -
386 -
387 t->interval /= 500; -
388 t->interval += 1; -
389 t->interval >>= 1; -
390 t->timeout.tv_sec = currentTime.tv_sec + t->interval; -
391 t->timeout.tv_usec = 0; -
392 -
393 -
394 if (currentTime.tv_usec > 500*1000)
evaluated: currentTime.tv_usec > 500*1000
TRUEFALSE
yes
Evaluation Count:1510
yes
Evaluation Count:3363
1510-3363
395 ++t->timeout.tv_sec;
executed: ++t->timeout.tv_sec;
Execution Count:1510
1510
396 }
executed: }
Execution Count:4873
4873
397 -
398 timerInsert(t); -
399}
executed: }
Execution Count:126699
126699
400 -
401bool QTimerInfoList::unregisterTimer(int timerId) -
402{ -
403 -
404 for (int i = 0; i < count(); ++i) {
partially evaluated: i < count()
TRUEFALSE
yes
Evaluation Count:62524791
no
Evaluation Count:0
0-62524791
405 register QTimerInfo *t = at(i); -
406 if (t->id == timerId) {
evaluated: t->id == timerId
TRUEFALSE
yes
Evaluation Count:124324
yes
Evaluation Count:62400467
124324-62400467
407 -
408 removeAt(i); -
409 if (t == firstTimerInfo)
evaluated: t == firstTimerInfo
TRUEFALSE
yes
Evaluation Count:11691
yes
Evaluation Count:112633
11691-112633
410 firstTimerInfo = 0;
executed: firstTimerInfo = 0;
Execution Count:11691
11691
411 if (t->activateRef)
evaluated: t->activateRef
TRUEFALSE
yes
Evaluation Count:11714
yes
Evaluation Count:112610
11714-112610
412 *(t->activateRef) = 0;
executed: *(t->activateRef) = 0;
Execution Count:11714
11714
413 delete t; -
414 return true;
executed: return true;
Execution Count:124324
124324
415 } -
416 }
executed: }
Execution Count:62400467
62400467
417 -
418 return false;
never executed: return false;
0
419} -
420 -
421bool QTimerInfoList::unregisterTimers(QObject *object) -
422{ -
423 if (isEmpty())
evaluated: isEmpty()
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:682
2-682
424 return false;
executed: return false;
Execution Count:2
2
425 for (int i = 0; i < count(); ++i) {
evaluated: i < count()
TRUEFALSE
yes
Evaluation Count:2553
yes
Evaluation Count:682
682-2553
426 register QTimerInfo *t = at(i); -
427 if (t->obj == object) {
evaluated: t->obj == object
TRUEFALSE
yes
Evaluation Count:719
yes
Evaluation Count:1834
719-1834
428 -
429 removeAt(i); -
430 if (t == firstTimerInfo)
partially evaluated: t == firstTimerInfo
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:719
0-719
431 firstTimerInfo = 0;
never executed: firstTimerInfo = 0;
0
432 if (t->activateRef)
partially evaluated: t->activateRef
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:719
0-719
433 *(t->activateRef) = 0;
never executed: *(t->activateRef) = 0;
0
434 delete t; -
435 -
436 --i; -
437 }
executed: }
Execution Count:719
719
438 }
executed: }
Execution Count:2553
2553
439 return true;
executed: return true;
Execution Count:682
682
440} -
441 -
442QList<QAbstractEventDispatcher::TimerInfo> QTimerInfoList::registeredTimers(QObject *object) const -
443{ -
444 QList<QAbstractEventDispatcher::TimerInfo> list; -
445 for (int i = 0; i < count(); ++i) {
evaluated: i < count()
TRUEFALSE
yes
Evaluation Count:25491
yes
Evaluation Count:23265
23265-25491
446 register const QTimerInfo * const t = at(i); -
447 if (t->obj == object) {
evaluated: t->obj == object
TRUEFALSE
yes
Evaluation Count:9
yes
Evaluation Count:25482
9-25482
448 list << QAbstractEventDispatcher::TimerInfo(t->id, -
449 (t->timerType == Qt::VeryCoarseTimer -
450 ? t->interval * 1000 -
451 : t->interval), -
452 t->timerType); -
453 }
executed: }
Execution Count:9
9
454 }
executed: }
Execution Count:25491
25491
455 return list;
executed: return list;
Execution Count:23266
23266
456} -
457 -
458 -
459 -
460 -
461int QTimerInfoList::activateTimers() -
462{ -
463 if (qt_disable_lowpriority_timers || isEmpty())
partially evaluated: qt_disable_lowpriority_timers
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:39595
evaluated: isEmpty()
TRUEFALSE
yes
Evaluation Count:13
yes
Evaluation Count:39582
0-39595
464 return 0;
executed: return 0;
Execution Count:13
13
465 -
466 int n_act = 0, maxCount = 0; -
467 firstTimerInfo = 0; -
468 -
469 timeval currentTime = updateCurrentTime(); -
470 -
471 repairTimersIfNeeded(); -
472 -
473 -
474 -
475 for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) {
evaluated: it != constEnd()
TRUEFALSE
yes
Evaluation Count:52228
yes
Evaluation Count:28140
28140-52228
476 if (currentTime < (*it)->timeout)
evaluated: currentTime < (*it)->timeout
TRUEFALSE
yes
Evaluation Count:11442
yes
Evaluation Count:40786
11442-40786
477 break;
executed: break;
Execution Count:11442
11442
478 maxCount++; -
479 }
executed: }
Execution Count:40786
40786
480 -
481 -
482 while (maxCount--) {
evaluated: maxCount--
TRUEFALSE
yes
Evaluation Count:40768
yes
Evaluation Count:39478
39478-40768
483 if (isEmpty())
partially evaluated: isEmpty()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:40768
0-40768
484 break;
never executed: break;
0
485 -
486 QTimerInfo *currentTimerInfo = first(); -
487 if (currentTime < currentTimerInfo->timeout)
evaluated: currentTime < currentTimerInfo->timeout
TRUEFALSE
yes
Evaluation Count:104
yes
Evaluation Count:40664
104-40664
488 break;
executed: break;
Execution Count:104
104
489 -
490 if (!firstTimerInfo) {
evaluated: !firstTimerInfo
TRUEFALSE
yes
Evaluation Count:40640
yes
Evaluation Count:24
24-40640
491 firstTimerInfo = currentTimerInfo; -
492 } else if (firstTimerInfo == currentTimerInfo) {
partially evaluated: firstTimerInfo == currentTimerInfo
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:24
executed: }
Execution Count:40640
0-40640
493 -
494 break;
never executed: break;
0
495 } else if (currentTimerInfo->interval < firstTimerInfo->interval
evaluated: currentTimerInfo->interval < firstTimerInfo->interval
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:18
6-18
496 || currentTimerInfo->interval == firstTimerInfo->interval) {
evaluated: currentTimerInfo->interval == firstTimerInfo->interval
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:17
1-17
497 firstTimerInfo = currentTimerInfo; -
498 }
executed: }
Execution Count:7
7
499 -
500 -
501 removeFirst(); -
502 calculateNextTimeout(currentTimerInfo, currentTime); -
503 -
504 -
505 timerInsert(currentTimerInfo); -
506 if (currentTimerInfo->interval > 0)
evaluated: currentTimerInfo->interval > 0
TRUEFALSE
yes
Evaluation Count:5127
yes
Evaluation Count:35537
5127-35537
507 n_act++;
executed: n_act++;
Execution Count:5127
5127
508 -
509 if (!currentTimerInfo->activateRef) {
evaluated: !currentTimerInfo->activateRef
TRUEFALSE
yes
Evaluation Count:40645
yes
Evaluation Count:19
19-40645
510 -
511 currentTimerInfo->activateRef = &currentTimerInfo; -
512 -
513 QTimerEvent e(currentTimerInfo->id); -
514 QCoreApplication::sendEvent(currentTimerInfo->obj, &e); -
515 -
516 if (currentTimerInfo)
evaluated: currentTimerInfo
TRUEFALSE
yes
Evaluation Count:28931
yes
Evaluation Count:11714
11714-28931
517 currentTimerInfo->activateRef = 0;
executed: currentTimerInfo->activateRef = 0;
Execution Count:28931
28931
518 }
executed: }
Execution Count:40645
40645
519 }
executed: }
Execution Count:40664
40664
520 -
521 firstTimerInfo = 0; -
522 -
523 return n_act;
executed: return n_act;
Execution Count:39582
39582
524} -
525 -
526 -
527 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial