Branch Coverage

HiRes.xs
Criterion Covered Total %
branch 95 174 54.6


line true false branch
815 0 0 return status == 0 ? Tp.tv_sec + (Tp.tv_usec / NV_1E6) : -1.0;
1065 0 0 if (sleepfor->tv_sec >= unslept->tv_sec) {
1067 0 0 if (sleepfor->tv_nsec >= unslept->tv_nsec) {
1069 0 0 } else if (sleepfor->tv_sec > 0) {
1146 5 0 if (items > 0) {
1147 1 4 if (useconds >= NV_1E6) {
1152 1 0 if (seconds) {
1156 1 3 } else if (useconds < 0.0)
1181 1 3 if (nsec < 0.0)
1185 3 0 if (nanosleep(&sleepfor, &unslept) == 0) {
1213 16 0 if (items > 0) {
1214 15 1 NV seconds = SvNV(ST(0));
1215 15 1 if (seconds >= 0.0) {
1217 2 13 if (seconds >= 1.0)
1219 0 15 if ((IV)useconds < 0) {
1227 0 0 if ((IV)useconds < 0)
1270 11 1 if (useconds < 0 || uinterval < 0)
0 11 if (useconds < 0 || uinterval < 0)
1275 0 11 if (hrt_ualarm_itimero(&itv, useconds, uinterval)) {
1300 12 1 if (seconds < 0.0 || interval < 0.0)
0 12 if (seconds < 0.0 || interval < 0.0)
1310 12 0 if (fseconds >= 1.0 || finterval >= 1.0)
0 12 if (fseconds >= 1.0 || finterval >= 1.0)
1324 0 12 if (setitimer(ITIMER_REAL, &nitv, &oitv)) {
1382 28 0 if (status == 0) {
1383 28 0 if (GIMME == G_ARRAY) {
24 4 if (GIMME == G_ARRAY) {
1384 0 24 EXTEND(sp, 2);
1388 0 4 EXTEND(sp, 1);
1400 14305456 0 if (status == 0) {
1423 2 0 if (seconds < 0.0 || interval < 0.0)
0 2 if (seconds < 0.0 || interval < 0.0)
1437 2 0 if (setitimer(which, &newit, &oldit) == 0) {
1438 0 2 EXTEND(sp, 1);
1440 2 0 if (GIMME == G_ARRAY) {
1 1 if (GIMME == G_ARRAY) {
1441 0 1 EXTEND(sp, 1);
1457 2182 0 if (getitimer(which, &nowit) == 0) {
1458 0 2182 EXTEND(sp, 1);
1460 2182 0 if (GIMME == G_ARRAY) {
2180 2 if (GIMME == G_ARRAY) {
1461 0 2180 EXTEND(sp, 1);
1489 1 7 if ( accessed == &PL_sv_undef && modified == &PL_sv_undef )
1 0 if ( accessed == &PL_sv_undef && modified == &PL_sv_undef )
1492 6 1 if (SvNV(accessed) < 0.0 || SvNV(modified) < 0.0)
6 0 if (SvNV(accessed) < 0.0 || SvNV(modified) < 0.0)
0 1 if (SvNV(accessed) < 0.0 || SvNV(modified) < 0.0)
5 1 if (SvNV(accessed) < 0.0 || SvNV(modified) < 0.0)
0 5 if (SvNV(accessed) < 0.0 || SvNV(modified) < 0.0)
1 0 if (SvNV(accessed) < 0.0 || SvNV(modified) < 0.0)
1493 2 0 croak("Time::HiRes::utime(%" NVgf ", %" NVgf
2 0 croak("Time::HiRes::utime(%" NVgf ", %" NVgf
1498 5 0 utbuf[0].tv_sec = (Time_t)SvNV(accessed); /* time accessed */
1500 5 0 (SvNV(accessed) - (NV)utbuf[0].tv_sec)
1503 5 0 utbuf[1].tv_sec = (Time_t)SvNV(modified); /* time modified */
1505 5 0 (SvNV(modified) - (NV)utbuf[1].tv_sec)
1509 8 6 while (items > 0) {
1512 3 5 if (SvROK(file) && GvIO(SvRV(file)) && IoIFP(sv_2io(SvRV(file)))) {
3 0 if (SvROK(file) && GvIO(SvRV(file)) && IoIFP(sv_2io(SvRV(file)))) {
0 3 if (SvROK(file) && GvIO(SvRV(file)) && IoIFP(sv_2io(SvRV(file)))) {
0 0 if (SvROK(file) && GvIO(SvRV(file)) && IoIFP(sv_2io(SvRV(file)))) {
3 0 if (SvROK(file) && GvIO(SvRV(file)) && IoIFP(sv_2io(SvRV(file)))) {
3 0 if (SvROK(file) && GvIO(SvRV(file)) && IoIFP(sv_2io(SvRV(file)))) {
3 0 if (SvROK(file) && GvIO(SvRV(file)) && IoIFP(sv_2io(SvRV(file)))) {
1514 0 3 if (fd < 0) {
1519 3 0 if (futimens(fd, utbufp) == 0) {
1534 5 0 char * name = SvPV(file, len);
1579 2 0 RETVAL = status == 0 ? ts.tv_sec + (NV) ts.tv_nsec / NV_1E9 : -1;
1612 1 0 RETVAL = status == 0 ? ts.tv_sec + (NV) ts.tv_nsec / NV_1E9 : -1;
1641 0 1 if (nsec < 0.0)
1645 1 0 if (clock_nanosleep(clock_id, flags, &sleepfor, &unslept) == 0) {
1679 4 0 RETVAL = clocks == (clock_t) -1 ? (clock_t) -1 : (NV)clocks / (NV)CLOCKS_PER_SEC;
1705 0 34 XPUSHs(sv_2mortal(newSVsv(items == 1 ? ST(0) : DEFSV)));
34 0 XPUSHs(sv_2mortal(newSVsv(items == 1 ? ST(0) : DEFSV)));
0 0 XPUSHs(sv_2mortal(newSVsv(items == 1 ? ST(0) : DEFSV)));
1711 12 22 fakeop.op_type = ix ? OP_LSTAT : OP_STAT;
1713 34 0 fakeop.op_flags = GIMME_V == G_ARRAY ? OPf_WANT_LIST :
34 0 fakeop.op_flags = GIMME_V == G_ARRAY ? OPf_WANT_LIST :
0 0 fakeop.op_flags = GIMME_V == G_ARRAY ? OPf_WANT_LIST :
1714 0 0 GIMME_V == G_SCALAR ? OPf_WANT_SCALAR : OPf_WANT_VOID;
1720 34 0 if (nret == 13) {
1721 0 34 UV atime = SvUV(ST( 8));
1722 0 34 UV mtime = SvUV(ST( 9));
1723 0 34 UV ctime = SvUV(ST(10));
1728 34 0 if (atime_nsec)
1730 34 0 if (mtime_nsec)
1732 34 0 if (ctime_nsec)