Added printHealth to IBackend interface.
This commit is contained in:
parent
56f23db878
commit
2f27d5d108
8 changed files with 54 additions and 44 deletions
|
@ -324,13 +324,8 @@ const xmrig::String &xmrig::OclBackend::type() const
|
|||
}
|
||||
|
||||
|
||||
void xmrig::OclBackend::execCommand(char command)
|
||||
void xmrig::OclBackend::execCommand(char)
|
||||
{
|
||||
# ifdef XMRIG_FEATURE_ADL
|
||||
if (command == 'e' || command == 'E') {
|
||||
d_ptr->printHealth();
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -373,6 +368,14 @@ void xmrig::OclBackend::printHashrate(bool details)
|
|||
}
|
||||
|
||||
|
||||
void xmrig::OclBackend::printHealth()
|
||||
{
|
||||
# ifdef XMRIG_FEATURE_ADL
|
||||
d_ptr->printHealth();
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
void xmrig::OclBackend::setJob(const Job &job)
|
||||
{
|
||||
const auto &cl = d_ptr->controller->config()->cl();
|
||||
|
@ -449,15 +452,6 @@ void xmrig::OclBackend::stop()
|
|||
void xmrig::OclBackend::tick(uint64_t ticks)
|
||||
{
|
||||
d_ptr->workers.tick(ticks);
|
||||
|
||||
# ifdef XMRIG_FEATURE_ADL
|
||||
if (isEnabled()) {
|
||||
auto seconds = d_ptr->controller->config()->healthPrintTime();
|
||||
if (seconds && ticks && (ticks % (seconds * 2)) == 0) {
|
||||
d_ptr->printHealth();
|
||||
}
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue