commit | 488e1c3fef2e789d38a5190baae977131a911fa7 | [log] [tgz] |
---|---|---|
author | Kevin O'Connor <kevin@koconnor.net> | Thu Nov 02 11:21:14 2017 -0400 |
committer | Kevin O'Connor <kevin@koconnor.net> | Thu Nov 02 11:28:25 2017 -0400 |
tree | 46846492609a01d9b86f3dddcf478e808c2e1ea4 | |
parent | cd47172a673762a05a0c7bd27df6e3cc8febe8d6 [diff] |
timer: Avoid integer overflows in usec and nsec calculations When timer_calc_usec() is used with large timeout values, such as 60s, the integer math can overflow and produce different results than when using timer_calc(time / 1000) for the same timeout. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>