summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2021-07-27 16:40:38 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2021-07-28 13:08:35 +0200
commit48a7ece8d0e065240153a85089f544383e16137f (patch)
treedd483a370a4535aa550ed39e006ab351f1382630 /apt-pkg/acquire-item.cc
parent7e88def0548a92112f8295686c2a12379e4028be (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.cc6
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;
}