summaryrefslogtreecommitdiffstats
path: root/examples/network/torrent/ratecontroller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/torrent/ratecontroller.cpp')
-rw-r--r--examples/network/torrent/ratecontroller.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/network/torrent/ratecontroller.cpp b/examples/network/torrent/ratecontroller.cpp
index 87c65096b6..96474806f5 100644
--- a/examples/network/torrent/ratecontroller.cpp
+++ b/examples/network/torrent/ratecontroller.cpp
@@ -96,8 +96,8 @@ void RateController::transfer()
if (sockets.isEmpty())
return;
- int msecs = 1000;
- if (!stopWatch.isNull())
+ qint64 msecs = 1000;
+ if (stopWatch.isValid())
msecs = qMin(msecs, stopWatch.elapsed());
qint64 bytesToWrite = (upLimit * msecs) / 1000;