KWSys: Avoid conversion warning in SystemTools::GetTime

Convert struct timeval members to double explicitly to avoid a GCC
warning with -Wconversion.
This commit is contained in:
Brad King 2011-08-04 08:29:30 -04:00
parent f31def8c62
commit 5f0eba49f2

View File

@ -296,7 +296,7 @@ double SystemTools::GetTime(void)
#else #else
struct timeval t; struct timeval t;
gettimeofday(&t, 0); gettimeofday(&t, 0);
return 1.0*t.tv_sec + 0.000001*t.tv_usec; return 1.0*double(t.tv_sec) + 0.000001*double(t.tv_usec);
#endif #endif
} }