Enabled keepalive for Windows (>= Vista)
This commit is contained in:
parent
e7de104d88
commit
5717e72367
6 changed files with 28 additions and 6 deletions
|
@ -49,6 +49,8 @@ public:
|
|||
static inline bool isUserActive(uint64_t ms) { return idleTime() < ms; }
|
||||
static inline const String &userAgent() { return m_userAgent; }
|
||||
|
||||
static bool hasKeepalive();
|
||||
|
||||
static bool isOnBatteryPower();
|
||||
static uint64_t idleTime();
|
||||
|
||||
|
|
|
@ -55,6 +55,12 @@ char *xmrig::Platform::createUserAgent()
|
|||
}
|
||||
|
||||
|
||||
bool xmrig::Platform::hasKeepalive()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool xmrig::Platform::setThreadAffinity(uint64_t cpu_id)
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -70,6 +70,12 @@ char *xmrig::Platform::createUserAgent()
|
|||
}
|
||||
|
||||
|
||||
bool xmrig::Platform::hasKeepalive()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#ifndef XMRIG_FEATURE_HWLOC
|
||||
#ifdef __DragonFly__
|
||||
|
||||
|
|
|
@ -70,6 +70,12 @@ char *xmrig::Platform::createUserAgent()
|
|||
}
|
||||
|
||||
|
||||
bool xmrig::Platform::hasKeepalive()
|
||||
{
|
||||
return winOsVersion().dwMajorVersion >= 6;
|
||||
}
|
||||
|
||||
|
||||
#ifndef XMRIG_FEATURE_HWLOC
|
||||
bool xmrig::Platform::setThreadAffinity(uint64_t cpu_id)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue