| line |
true |
false |
branch |
|
72
|
4 |
0 |
const char* clock_ptr = SvPV(clock_name, length); |
|
73
|
7 |
0 |
for (i = 0; i < sizeof clocks / sizeof *clocks; ++i) { |
|
74
|
4 |
3 |
if (clocks[i].key_length == length && strEQ(clock_ptr, clocks[i].key)) |
|
|
4 |
0 |
if (clocks[i].key_length == length && strEQ(clock_ptr, clocks[i].key)) |
|
93
|
0 |
4 |
if (timer_delete(*(timer_t*)magic->mg_ptr)) |
|
102
|
1 |
0 |
if (!SvROK(ref) || !(value = SvRV(ref)) || !SvMAGICAL(value) || (magic = mg_findext(value, PERL_MAGIC_ext, vtbl)) == NULL) |
|
|
1 |
0 |
if (!SvROK(ref) || !(value = SvRV(ref)) || !SvMAGICAL(value) || (magic = mg_findext(value, PERL_MAGIC_ext, vtbl)) == NULL) |
|
|
1 |
0 |
if (!SvROK(ref) || !(value = SvRV(ref)) || !SvMAGICAL(value) || (magic = mg_findext(value, PERL_MAGIC_ext, vtbl)) == NULL) |
|
|
0 |
1 |
if (!SvROK(ref) || !(value = SvRV(ref)) || !SvMAGICAL(value) || (magic = mg_findext(value, PERL_MAGIC_ext, vtbl)) == NULL) |
|
111
|
14 |
0 |
if (!SvROK(ref) || !(value = SvRV(ref))) |
|
|
0 |
14 |
if (!SvROK(ref) || !(value = SvRV(ref))) |
|
113
|
0 |
14 |
return SvUV(value); |
|
139
|
2 |
3 |
if (ret != 0) { |
|
141
|
0 |
2 |
if (ret != EINTR) |
|
183
|
11 |
4 |
for(i = 0; i < items; i += 2) { |
|
187
|
11 |
0 |
current = SvPV(key, curlen); |
|
188
|
6 |
5 |
if (curlen == 5) { |
|
189
|
1 |
5 |
if (strEQ(current, "clock")) |
|
190
|
0 |
1 |
para->clockid = SvROK(value) ? get_clock(value, "create timer") : get_clockid(value); |
|
191
|
4 |
1 |
else if (strEQ(current, "value")) |
|
192
|
4 |
0 |
nv_to_timespec(SvNV(value), ¶->itimer.it_value); |
|
193
|
1 |
0 |
else if (strEQ(current, "ident")) |
|
194
|
1 |
0 |
para->ident = SvIV(value); |
|
198
|
4 |
1 |
else if (curlen == 6 && strEQ(current, "signal")) |
|
|
4 |
0 |
else if (curlen == 6 && strEQ(current, "signal")) |
|
199
|
0 |
4 |
para->signo = (SvIOK(value) || looks_like_number(value)) ? SvIV(value) : whichsig(SvPV_nolen(value)); |
|
|
0 |
0 |
para->signo = (SvIOK(value) || looks_like_number(value)) ? SvIV(value) : whichsig(SvPV_nolen(value)); |
|
|
4 |
0 |
para->signo = (SvIOK(value) || looks_like_number(value)) ? SvIV(value) : whichsig(SvPV_nolen(value)); |
|
|
0 |
0 |
para->signo = (SvIOK(value) || looks_like_number(value)) ? SvIV(value) : whichsig(SvPV_nolen(value)); |
|
200
|
1 |
0 |
else if (curlen == 8) { |
|
201
|
1 |
0 |
if (strEQ(current, "interval")) |
|
202
|
1 |
0 |
nv_to_timespec(SvNV(value), ¶->itimer.it_interval); |
|
203
|
0 |
0 |
else if (strEQ(current, "absolute")) |
|
220
|
0 |
4 |
if (para->signo < 0) |
|
234
|
0 |
4 |
if (timer_create(para->clockid, &event, timer) < 0) { |
|
238
|
0 |
4 |
if (timer_settime(*timer, para->flags, ¶->itimer, NULL) < 0) |
|
261
|
3 |
0 |
class_str = SvPV(class, length); |
|
282
|
0 |
0 |
if (timer_gettime(timer, &value) == -1) |
|
284
|
0 |
0 |
mXPUSHn(timespec_to_nv(&value.it_value)); |
|
285
|
0 |
0 |
if (GIMME_V == G_ARRAY) |
|
|
0 |
0 |
if (GIMME_V == G_ARRAY) |
|
286
|
0 |
0 |
mXPUSHn(timespec_to_nv(&value.it_interval)); |
|
301
|
0 |
1 |
if (timer_settime(timer, (abstime ? TIMER_ABSTIME : 0), &new_itimer, &old_itimer) == -1) |
|
303
|
0 |
1 |
mXPUSHn(timespec_to_nv(&old_itimer.it_value)); |
|
304
|
1 |
0 |
if (GIMME_V == G_ARRAY) |
|
|
0 |
1 |
if (GIMME_V == G_ARRAY) |
|
305
|
0 |
0 |
mXPUSHn(timespec_to_nv(&old_itimer.it_interval)); |
|
315
|
0 |
0 |
if (RETVAL == -1) |
|
330
|
3 |
0 |
clockid = items > 1 ? get_clockid(ST(1)) : CLOCK_REALTIME; |
|
351
|
0 |
1 |
if (SvOK(pid) && SvROK(pid) && sv_derived_from(pid, "threads")) { |
|
|
0 |
0 |
if (SvOK(pid) && SvROK(pid) && sv_derived_from(pid, "threads")) { |
|
|
0 |
0 |
if (SvOK(pid) && SvROK(pid) && sv_derived_from(pid, "threads")) { |
|
|
0 |
1 |
if (SvOK(pid) && SvROK(pid) && sv_derived_from(pid, "threads")) { |
|
|
0 |
0 |
if (SvOK(pid) && SvROK(pid) && sv_derived_from(pid, "threads")) { |
|
361
|
0 |
1 |
if (clock_getcpuclockid(SvOK(pid) ? SvIV(pid) : 0, &clockid) != 0) |
|
|
0 |
0 |
if (clock_getcpuclockid(SvOK(pid) ? SvIV(pid) : 0, &clockid) != 0) |
|
|
0 |
0 |
if (clock_getcpuclockid(SvOK(pid) ? SvIV(pid) : 0, &clockid) != 0) |
|
|
0 |
1 |
if (clock_getcpuclockid(SvOK(pid) ? SvIV(pid) : 0, &clockid) != 0) |
|
|
0 |
1 |
if (clock_getcpuclockid(SvOK(pid) ? SvIV(pid) : 0, &clockid) != 0) |
|
378
|
11 |
1 |
for (i = 0; i < max; ++i) |
|
379
|
0 |
11 |
mXPUSHp(clocks[i].key, clocks[i].key_length); |
|
390
|
0 |
8 |
if (clock_gettime(clockid, &time) == -1) |
|
406
|
0 |
0 |
if (clock_settime(clockid, &time) == -1) |
|
417
|
0 |
1 |
if (clock_getres(clockid, &time) == -1) |
|
447
|
1 |
2 |
if (clock_nanosleep(clockid, flags, &sleep_time, &remain_time) == EINTR) |
|
448
|
1 |
0 |
RETVAL = abstime ? frac_time : timespec_to_nv(&remain_time); |
|
465
|
0 |
1 |
if (abstime) |
|
468
|
0 |
1 |
if (clock_gettime(clockid, &sleep_time) == -1) |
|
472
|
1 |
1 |
while (clock_nanosleep(clockid, TIMER_ABSTIME, &sleep_time, NULL) == EINTR); |