mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 13:13:49 +01:00
macOS: disable AppNap during sync
Signed-off-by: Alexey Ivanov <alexey.ivanes@gmail.com>
This commit is contained in:
24
src/qt/macos_appnap.h
Normal file
24
src/qt/macos_appnap.h
Normal file
@@ -0,0 +1,24 @@
|
||||
// Copyright (c) 2011-2018 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_QT_MACOS_APPNAP_H
|
||||
#define BITCOIN_QT_MACOS_APPNAP_H
|
||||
|
||||
#include <memory>
|
||||
|
||||
class CAppNapInhibitor final
|
||||
{
|
||||
public:
|
||||
explicit CAppNapInhibitor();
|
||||
~CAppNapInhibitor();
|
||||
|
||||
void disableAppNap();
|
||||
void enableAppNap();
|
||||
|
||||
private:
|
||||
class CAppNapImpl;
|
||||
std::unique_ptr<CAppNapImpl> impl;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_MACOS_APPNAP_H
|
||||
Reference in New Issue
Block a user