[trunk] Another round of fixes for sign conversion warnings.
[openjpeg.git] / src / lib / openjp2 / opj_clock.c
index dbbf6e0adec13f5aeb0596338b5c210ebb05608f..5f2ab9dc0de894d5568de5b66a55260cd8d3f5b4 100644 (file)
@@ -51,9 +51,9 @@ OPJ_FLOAT64 opj_clock(void) {
     getrusage(0,&t);
     /* (2) What is the elapsed time ? - CPU time = User time + System time */
        /* (2a) Get the seconds */
-    procTime = t.ru_utime.tv_sec + t.ru_stime.tv_sec;
+    procTime = (OPJ_FLOAT64)(t.ru_utime.tv_sec + t.ru_stime.tv_sec);
     /* (2b) More precisely! Get the microseconds part ! */
-    return ( procTime + (t.ru_utime.tv_usec + t.ru_stime.tv_usec) * 1e-6 ) ;
+    return ( procTime + (OPJ_FLOAT64)(t.ru_utime.tv_usec + t.ru_stime.tv_usec) * 1e-6 ) ;
 #endif
 }