diff options
author | David Kalnischkies <david@kalnischkies.de> | 2020-02-06 14:25:28 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2020-02-06 14:25:28 +0100 |
commit | ef50424be1586b91a99d28bf5108f3999cc908fb (patch) | |
tree | 9a3a81b2d73eaa68577e1c3c7a4f8cd55e69807c /apt-pkg/contrib | |
parent | cfbece15c4ba68b798ce3e8fffce19a89ffcd756 (diff) |
Fix remaining usec vs sec time-delta calculation typos
While moving to a more stable clock in 79b61ae I typoed the microsecond
calculation part and copied it all over the place… Julian fixed the
first two instances in 089e6271 and Trent reported the apt-ftparchive
instances leaving one instance in progress (invisible for user though).
A bit ironic that in an attempt to stop "confusing (and amusing) users"
I managed to hide a typo for close to two years doing just that…
Sadly we can't really test this as while "apt-ftparchive generate /dev/null"
is a great interactive test, it is hard to teach our test framework that
the output is "reasonably below an hour" (usually 0s, but on busy test
systems it is perhaps longer…).
Thanks: Trent W. Buck for initial patch
Closes: #950776
References: 79b61ae7673eb6213493e2cb202f0d70c390932d,
089e627153781ae7c320a5a0724c6c70d684b689
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/progress.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/progress.cc b/apt-pkg/contrib/progress.cc index 806bd47f8..971198270 100644 --- a/apt-pkg/contrib/progress.cc +++ b/apt-pkg/contrib/progress.cc @@ -123,7 +123,7 @@ bool OpProgress::CheckChange(float Interval) std::chrono::duration<decltype(Interval)> Delta = std::chrono::seconds(NowTime.tv_sec - LastTime.tv_sec) + - std::chrono::microseconds(NowTime.tv_sec - LastTime.tv_usec); + std::chrono::microseconds(NowTime.tv_usec - LastTime.tv_usec); if (Delta.count() < Interval) return false; |