diff options
Diffstat (limited to 'examples/network/torrent/torrentclient.cpp')
-rw-r--r-- | examples/network/torrent/torrentclient.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp index 6fefb3855c..4ae1debcb3 100644 --- a/examples/network/torrent/torrentclient.cpp +++ b/examples/network/torrent/torrentclient.cpp @@ -14,6 +14,7 @@ #include <QNetworkInterface> #include <algorithm> +#include <chrono> // These constants could also be configurable by the user. static const int ServerMinPort = 6881; @@ -23,10 +24,10 @@ static const int MaxBlocksInProgress = 5; static const int MaxBlocksInMultiMode = 2; static const int MaxConnectionPerPeer = 1; static const int RateControlWindowLength = 10; -static const int RateControlTimerDelay = 1000; +static const std::chrono::seconds RateControlTimerDelay(1); static const int MinimumTimeBeforeRevisit = 30; static const int MaxUploads = 4; -static const int UploadScheduleInterval = 10000; +static const std::chrono::seconds UploadScheduleInterval(10); struct TorrentPiece { QBitArray completedBlocks; |