aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libubox/Makefile
diff options
context:
space:
mode:
authorJan Hoffmann <jan@3e8.eu>2022-04-25 21:52:39 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2022-06-07 21:36:58 +0200
commit8f4b5fdd5f1a2a85f3b16da69a03edf1c3470369 (patch)
treed16dbaa05c08ca414a7c6ba8db66cc665b49b01d /package/libs/libubox/Makefile
parentea0744fbc699e030b2917f5fa2493068cab2b60f (diff)
downloadupstream-8f4b5fdd5f1a2a85f3b16da69a03edf1c3470369.tar.gz
upstream-8f4b5fdd5f1a2a85f3b16da69a03edf1c3470369.tar.bz2
upstream-8f4b5fdd5f1a2a85f3b16da69a03edf1c3470369.zip
ltq-vdsl/ltq-adsl: fix elapsed time calculation
The driver maintains elapsed times by repeatedly accumulating the time since the previous update in a loop. For the elapsed showtime time, the time difference is truncated to seconds before adding it, leading to a sizable error over time. Move the truncation to before calculation of the time difference in order to remove this error. Also maintain the total elapsed time in the same way in full seconds, to prevent the unsigned 32-bit counter from wrapping around after about 50 days. Testing on a VR9 device shows that the reported line uptime now matches the actual elapsed wall time. The ADSL variant is only compile-tested, but it should also work as the relevant code is identical. Signed-off-by: Jan Hoffmann <jan@3e8.eu> Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> (cherry picked from commit db4bf4b968c0da035d98e7771fc993af9d6f742b)
Diffstat (limited to 'package/libs/libubox/Makefile')
0 files changed, 0 insertions, 0 deletions