mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-28 04:35:40 -04:00
Fixed error in rtt/rta calculation in case of system clock problems
Time differences are now set to 0 in case of backward timejumps so there are no wrap-around problems any more. The RTA calculation hopefully gets a more accurate value in these cases also.
This commit is contained in:
parent
38e20a1a33
commit
5f67308451
1 changed files with 1 additions and 1 deletions
|
|
@ -1035,7 +1035,7 @@ get_timevaldiff(struct timeval *early, struct timeval *later)
|
|||
if(!early) early = &prog_start;
|
||||
|
||||
/* if early > later we return 0 so as to indicate a timeout */
|
||||
if(early->tv_sec > early->tv_sec ||
|
||||
if(early->tv_sec > later->tv_sec ||
|
||||
(early->tv_sec == later->tv_sec && early->tv_usec > later->tv_usec))
|
||||
{
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue