Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
macos_appnap.mm
Go to the documentation of this file.
1// Copyright (c) 2011-2018 The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#include "macos_appnap.h"
6
7#include <AvailabilityMacros.h>
8#include <Foundation/Foundation.h>
9#include <Foundation/NSProcessInfo.h>
10
12public:
14 if (activityId) {
16 }
17 }
18
39
40 void enableAppNap() {
41 if (activityId) {
44 if ([processInfo respondsToSelector:@selector(endActivity:)]) {
46 }
47
48 [activityId release];
50 }
51 }
52 }
53
54private:
56};
57
59
61
63 impl->disableAppNap();
64}
65
67 impl->enableAppNap();
68}
std::unique_ptr< CAppNapImpl > impl
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85