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:
parent
f31def8c62
commit
5f0eba49f2
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user