mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-10-06 03:46:35 +08:00
Apple introduced app-nap with OS X 10.10. This feature saves power by throttling apps running in background. However, it also less accurate timers in systemcalls. In our case a 30ms select timeout would take up to 10s. This patch uses an API also added with 10.10 to disable app-nap as long as the serial port is polled.
17 lines
No EOL
582 B
C
17 lines
No EOL
582 B
C
//-----------------------------------------------------------------------------
|
|
// (c) 2018 AntiCat
|
|
//
|
|
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
|
// at your option, any later version. See the LICENSE.txt file for the text of
|
|
// the license.
|
|
//-----------------------------------------------------------------------------
|
|
// macOS framework bindings
|
|
//-----------------------------------------------------------------------------
|
|
|
|
#ifndef UTIL_DARWIN_H__
|
|
#define UTIL_DARWIN_H__
|
|
|
|
void disableAppNap(const char* reason);
|
|
void enableAppNap();
|
|
|
|
#endif |