File indexing completed on 2025-01-05 04:37:17

0001 /*
0002     SPDX-FileCopyrightText: 2007 Joris Guisson <joris.guisson@gmail.com>
0003     SPDX-FileCopyrightText: 2007 Ivan Vasic <ivasic@gmail.com>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 #include "queuemanagerinterface.h"
0008 #include <torrent/torrentcontrol.h>
0009 
0010 namespace bt
0011 {
0012 bool QueueManagerInterface::qm_enabled = true;
0013 
0014 QueueManagerInterface::QueueManagerInterface()
0015 {
0016 }
0017 
0018 QueueManagerInterface::~QueueManagerInterface()
0019 {
0020 }
0021 
0022 void QueueManagerInterface::setQueueManagerEnabled(bool on)
0023 {
0024     qm_enabled = on;
0025 }
0026 
0027 bool QueueManagerInterface::permitStatsSync(TorrentControl *tc)
0028 {
0029     return tc->getStatsSyncElapsedTime() >= 5 * 60 * 1000; // 5 sec
0030 }
0031 
0032 }