try to remove the spurious warning for static analysis
Change-Id: Ib81f16c70a0bfad05021401c1cf6788c974b63bd
This commit is contained in:
parent
a891164398
commit
dc5b122f23
@ -46,10 +46,13 @@ static WEBP_INLINE void StopwatchReset(Stopwatch* watch) {
|
||||
}
|
||||
|
||||
static WEBP_INLINE double StopwatchReadAndReset(Stopwatch* watch) {
|
||||
const struct timeval old_value = *watch;
|
||||
struct timeval old_value;
|
||||
double delta_sec, delta_usec;
|
||||
memcpy(&old_value, watch, sizeof(old_value));
|
||||
gettimeofday(watch, NULL);
|
||||
return watch->tv_sec - old_value.tv_sec +
|
||||
(watch->tv_usec - old_value.tv_usec) / 1000000.0;
|
||||
delta_sec = (double)watch->tv_sec - old_value.tv_sec;
|
||||
delta_usec = (double)watch->tv_usec - old_value.tv_usec;
|
||||
return delta_sec + delta_usec / 1000000.0;
|
||||
}
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user