mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Optimize conversion of time points from libtorrent to Qt clocks
Obtain current date time of Qt and libtorrent clocks only once for processing entire current libtorrent alerts bunch. PR #21764.
This commit is contained in:
committed by
GitHub
parent
051d7137ea
commit
75d1ac8889
@@ -476,6 +476,8 @@ namespace BitTorrent
|
||||
void addMappedPorts(const QSet<quint16> &ports);
|
||||
void removeMappedPorts(const QSet<quint16> &ports);
|
||||
|
||||
QDateTime fromLTTimePoint32(const lt::time_point32 &timePoint) const;
|
||||
|
||||
template <typename Func>
|
||||
void invoke(Func &&func)
|
||||
{
|
||||
@@ -826,6 +828,9 @@ namespace BitTorrent
|
||||
|
||||
QList<TorrentImpl *> m_pendingFinishedTorrents;
|
||||
|
||||
QDateTime m_qNow;
|
||||
lt::clock_type::time_point m_ltNow;
|
||||
|
||||
friend void Session::initInstance();
|
||||
friend void Session::freeInstance();
|
||||
friend Session *Session::instance();
|
||||
|
||||
Reference in New Issue
Block a user