diff options
Diffstat (limited to 'examples/network/torrent/torrentclient.cpp')
-rw-r--r-- | examples/network/torrent/torrentclient.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp index 6b184be39c..ba87924ff9 100644 --- a/examples/network/torrent/torrentclient.cpp +++ b/examples/network/torrent/torrentclient.cpp @@ -703,7 +703,7 @@ void TorrentClient::connectToPeers() // Pick a random peer from the list of weighed peers. TorrentPeer *peer = weighedPeers.takeAt(qrand() % weighedPeers.size()); weighedPeers.removeAll(peer); - peer->connectStart = QDateTime::currentDateTime().toTime_t(); + peer->connectStart = QDateTime::currentSecsSinceEpoch(); peer->lastVisited = peer->connectStart; // Connect to the peer. @@ -717,7 +717,7 @@ QList<TorrentPeer *> TorrentClient::weighedFreePeers() const QList<TorrentPeer *> weighedPeers; // Generate a list of peers that we want to connect to. - uint now = QDateTime::currentDateTime().toTime_t(); + qint64 now = QDateTime::currentSecsSinceEpoch(); QList<TorrentPeer *> freePeers; QMap<QString, int> connectionsPerPeer; foreach (TorrentPeer *peer, d->peers) { |