Re: forewarning: usedevel and versiononly
[p5sagit/p5-mst-13.2.git] / ext / Time / HiRes / HiRes.xs
index 5292231..3db3902 100644 (file)
@@ -618,7 +618,7 @@ sleep(...)
        if (items > 0) {
            NV seconds  = SvNV(ST(0));
            if (seconds >= 0.0) {
-                UV useconds = 1E6 * (seconds - (UV)seconds);
+                UV useconds = (UV)(1E6 * (seconds - (UV)seconds));
                 if (seconds >= 1.0)
                     sleep((UV)seconds);
                 usleep(useconds);
@@ -746,7 +746,7 @@ setitimer(which, seconds, interval = 0)
        struct itimerval oldit;
     PPCODE:
        if (seconds < 0.0 || interval < 0.0)
-           croak("Time::HiRes::setitimer(%"IVdf", %"NVgf", %"NVgf"): negative time not invented yet", which, seconds, interval);
+           croak("Time::HiRes::setitimer(%"IVdf", %"NVgf", %"NVgf"): negative time not invented yet", (IV)which, seconds, interval);
        newit.it_value.tv_sec  = seconds;
        newit.it_value.tv_usec =
          (seconds  - (NV)newit.it_value.tv_sec)    * 1000000.0;