summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/opj_clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/openjp2/opj_clock.c')
-rw-r--r--src/lib/openjp2/opj_clock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/openjp2/opj_clock.c b/src/lib/openjp2/opj_clock.c
index dbbf6e0a..5f2ab9dc 100644
--- a/src/lib/openjp2/opj_clock.c
+++ b/src/lib/openjp2/opj_clock.c
@@ -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
}