diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2021-07-27 16:40:38 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2021-07-28 13:08:35 +0200 |
commit | 48a7ece8d0e065240153a85089f544383e16137f (patch) | |
tree | dd483a370a4535aa550ed39e006ab351f1382630 /apt-pkg/acquire-item.cc | |
parent | 7e88def0548a92112f8295686c2a12379e4028be (diff) |
Convert to monotonic clock
This yields more accurate delays and avoids issues with clock
skew.
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r-- | apt-pkg/acquire-item.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 20d80edc0..eb8053feb 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -290,7 +290,7 @@ public: std::vector<std::string> BadAlternativeSites; std::vector<std::string> PastRedirections; std::unordered_map<std::string, std::string> CustomFields; - time_t FetchAfter = 0; + time_point FetchAfter = {}; Private() { @@ -1121,11 +1121,11 @@ std::string pkgAcquire::Item::HashSum() const /*{{{*/ return hs != NULL ? hs->toStr() : ""; } /*}}}*/ -void pkgAcquire::Item::FetchAfter(time_t FetchAfter) /*{{{*/ +void pkgAcquire::Item::FetchAfter(time_point FetchAfter) /*{{{*/ { d->FetchAfter = FetchAfter; } -time_t pkgAcquire::Item::FetchAfter() +pkgAcquire::time_point pkgAcquire::Item::FetchAfter() { return d->FetchAfter; } |