[trunk] modify type of opj_clock function
authorMickael Savinaud <savmickael@users.noreply.github.com>
Mon, 15 Oct 2012 12:43:44 +0000 (12:43 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Mon, 15 Oct 2012 12:43:44 +0000 (12:43 +0000)
src/lib/openjp2/j2k_lib.c

index a96df2210288b6c0a3657e37fbca717827b0e097..dbbf6e0adec13f5aeb0596338b5c210ebb05608f 100644 (file)
@@ -42,11 +42,11 @@ OPJ_FLOAT64 opj_clock(void) {
        /* cout << "freq = " << ((double) freq.QuadPart) << endl; */
     /* t is the high resolution performance counter (see MSDN) */
     QueryPerformanceCounter ( & t ) ;
-    return ( t.QuadPart /(double) freq.QuadPart ) ;
+    return ( t.QuadPart /(OPJ_FLOAT64) freq.QuadPart ) ;
 #else
        /* Unix or Linux: use resource usage */
     struct rusage t;
-    double procTime;
+    OPJ_FLOAT64 procTime;
     /* (1) Get the rusage data structure at this moment (man getrusage) */
     getrusage(0,&t);
     /* (2) What is the elapsed time ? - CPU time = User time + System time */