summaryrefslogtreecommitdiff
path: root/methods/http.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2018-05-26 21:26:03 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2018-05-29 13:04:59 +0200
commitf6655a1138a11e80884959014939a25f23a1e308 (patch)
tree4169c00124a5e97d73ed7fd44483eb54ab9b1af7 /methods/http.h
parent2fc09a90e7e62a4c3e4a67506bf90fcf4c6ccfaf (diff)
Use steady clock source for bandwidth limitation
Using the time of day for this is slightly wrong just like it is for progress, just less visible.
Diffstat (limited to 'methods/http.h')
-rw-r--r--methods/http.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/methods/http.h b/methods/http.h
index ae6cedc13..5668f0b87 100644
--- a/methods/http.h
+++ b/methods/http.h
@@ -12,6 +12,7 @@
#include <apt-pkg/strutl.h>
+#include <chrono>
#include <iostream>
#include <memory>
#include <string>
@@ -39,7 +40,7 @@ class CircleBuf
static unsigned long long BwReadLimit;
static unsigned long long BwTickReadData;
- static struct timeval BwReadTick;
+ static std::chrono::steady_clock::duration BwReadTick;
static const unsigned int BW_HZ;
unsigned long long LeftRead() const