Branch Coverage

HiRes.xs
Criterion Covered Total %
branch 95 174 54.6


line true false branch
630 0 0 return status == 0 ? Tp.tv_sec + (Tp.tv_usec / NV_1E6) : -1.0;
880 0 0 if (sleepfor->tv_sec >= unslept->tv_sec) {
882 0 0 if (sleepfor->tv_nsec >= unslept->tv_nsec) {
884 0 0 } else if (sleepfor->tv_sec > 0) {
961 5 0 if (items > 0) {
962 1 4 if (useconds >= NV_1E6) {
967 1 0 if (seconds) {
971 1 3 } else if (useconds < 0.0)
996 1 3 if (nsec < 0.0)
1000 3 0 if (nanosleep(&sleepfor, &unslept) == 0) {
1028 16 0 if (items > 0) {
1029 15 1 NV seconds = SvNV(ST(0));
1030 15 1 if (seconds >= 0.0) {
1032 2 13 if (seconds >= 1.0)
1034 0 15 if ((IV)useconds < 0) {
1042 0 0 if ((IV)useconds < 0)
1085 11 1 if (useconds < 0 || uinterval < 0)
0 11 if (useconds < 0 || uinterval < 0)
1090 0 11 if (hrt_ualarm_itimero(&itv, useconds, uinterval)) {
1115 12 1 if (seconds < 0.0 || interval < 0.0)
0 12 if (seconds < 0.0 || interval < 0.0)
1125 12 0 if (fseconds >= 1.0 || finterval >= 1.0)
0 12 if (fseconds >= 1.0 || finterval >= 1.0)
1139 0 12 if (setitimer(ITIMER_REAL, &nitv, &oitv)) {
1197 28 0 if (status == 0) {
1198 28 0 if (GIMME == G_ARRAY) {
24 4 if (GIMME == G_ARRAY) {
1199 0 24 EXTEND(sp, 2);
1203 0 4 EXTEND(sp, 1);
1215 12158621 0 if (status == 0) {
1238 2 0 if (seconds < 0.0 || interval < 0.0)
0 2 if (seconds < 0.0 || interval < 0.0)
1252 2 0 if (setitimer(which, &newit, &oldit) == 0) {
1253 0 2 EXTEND(sp, 1);
1255 2 0 if (GIMME == G_ARRAY) {
1 1 if (GIMME == G_ARRAY) {
1256 0 1 EXTEND(sp, 1);
1272 2046 0 if (getitimer(which, &nowit) == 0) {
1273 0 2046 EXTEND(sp, 1);
1275 2046 0 if (GIMME == G_ARRAY) {
2044 2 if (GIMME == G_ARRAY) {
1276 0 2044 EXTEND(sp, 1);
1304 1 7 if ( accessed == &PL_sv_undef && modified == &PL_sv_undef )
1 0 if ( accessed == &PL_sv_undef && modified == &PL_sv_undef )
1307 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)
1308 2 0 croak("Time::HiRes::utime(%" NVgf ", %" NVgf
2 0 croak("Time::HiRes::utime(%" NVgf ", %" NVgf
1313 5 0 utbuf[0].tv_sec = (Time_t)SvNV(accessed); /* time accessed */
1315 5 0 (SvNV(accessed) - (NV)utbuf[0].tv_sec)
1318 5 0 utbuf[1].tv_sec = (Time_t)SvNV(modified); /* time modified */
1320 5 0 (SvNV(modified) - (NV)utbuf[1].tv_sec)
1324 8 6 while (items > 0) {
1327 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)))) {
1329 0 3 if (fd < 0) {
1334 3 0 if (futimens(fd, utbufp) == 0) {
1349 5 0 char * name = SvPV(file, len);
1394 2 0 RETVAL = status == 0 ? ts.tv_sec + (NV) ts.tv_nsec / NV_1E9 : -1;
1427 1 0 RETVAL = status == 0 ? ts.tv_sec + (NV) ts.tv_nsec / NV_1E9 : -1;
1456 0 1 if (nsec < 0.0)
1460 1 0 if (clock_nanosleep(clock_id, flags, &sleepfor, &unslept) == 0) {
1494 4 0 RETVAL = clocks == (clock_t) -1 ? (clock_t) -1 : (NV)clocks / (NV)CLOCKS_PER_SEC;
1520 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)));
1526 12 22 fakeop.op_type = ix ? OP_LSTAT : OP_STAT;
1528 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 :
1529 0 0 GIMME_V == G_SCALAR ? OPf_WANT_SCALAR : OPf_WANT_VOID;
1535 34 0 if (nret == 13) {
1536 0 34 UV atime = SvUV(ST( 8));
1537 0 34 UV mtime = SvUV(ST( 9));
1538 0 34 UV ctime = SvUV(ST(10));
1543 34 0 if (atime_nsec)
1545 34 0 if (mtime_nsec)
1547 34 0 if (ctime_nsec)